fix: get trace list crash when trace not initialized
This commit is contained in:
parent
7ba1fa00dc
commit
3dd2084c2e
|
@ -104,7 +104,10 @@ start_link() ->
|
||||||
|
|
||||||
-spec list() -> [tuple()].
|
-spec list() -> [tuple()].
|
||||||
list() ->
|
list() ->
|
||||||
ets:match_object(?TRACE, #?TRACE{_ = '_'}).
|
case ets:info(?TRACE) of
|
||||||
|
undefined -> [];
|
||||||
|
_ -> ets:match_object(?TRACE, #?TRACE{_ = '_'})
|
||||||
|
end.
|
||||||
|
|
||||||
-spec is_enable() -> boolean().
|
-spec is_enable() -> boolean().
|
||||||
is_enable() ->
|
is_enable() ->
|
||||||
|
|
Loading…
Reference in New Issue