fix: get trace list crash when trace not initialized

This commit is contained in:
zhongwencool 2022-10-14 16:05:01 +08:00
parent 7ba1fa00dc
commit 3dd2084c2e
1 changed files with 4 additions and 1 deletions

View File

@ -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() ->