diff options
author | Siri Hansen <[email protected]> | 2018-12-20 13:10:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-12-20 13:10:46 +0100 |
commit | 7759ef4247f0fa9bec765e1c90234a2333eda9d0 (patch) | |
tree | bab66029bf4faa5c08ba6b250b9e041ea28cd23d /lib | |
parent | e84bdaa6d4aab903288cb0a6c47c66068cb4181a (diff) | |
parent | 6d12c10932bdb5998c6bbb9328dd9e915f59ff85 (diff) | |
download | otp-7759ef4247f0fa9bec765e1c90234a2333eda9d0.tar.gz otp-7759ef4247f0fa9bec765e1c90234a2333eda9d0.tar.bz2 otp-7759ef4247f0fa9bec765e1c90234a2333eda9d0.zip |
Merge pull request #2064 from kjnilsson/observer/expand_term_fix
Observer: fix crash bug when expanding term
OTP-15493
Diffstat (limited to 'lib')
-rw-r--r-- | lib/observer/src/cdv_html_wx.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/observer/src/cdv_html_wx.erl b/lib/observer/src/cdv_html_wx.erl index ffef83227c..8956173c93 100644 --- a/lib/observer/src/cdv_html_wx.erl +++ b/lib/observer/src/cdv_html_wx.erl @@ -79,14 +79,14 @@ handle_info(active, #state{panel=HtmlWin,delayed_fetch=Callback}=State) observer_lib:sync_destroy_progress_dialog(), wx_misc:beginBusyCursor(), wxHtmlWindow:setPage(HtmlWin,HtmlText), - cdv_wx:set_status(TW), + cdv_wx_set_status(State, TW), wx_misc:endBusyCursor(), {noreply, State#state{expand_table=Tab, delayed_fetch=undefined, trunc_warn=TW}}; handle_info(active, State) -> - cdv_wx:set_status(State#state.trunc_warn), + cdv_wx_set_status(State, State#state.trunc_warn), {noreply, State}; handle_info(Info, State) -> @@ -164,3 +164,10 @@ expand(Id,Callback,#state{expand_wins=Opened0, app=App}=State) -> Opened0 end, State#state{expand_wins=Opened}. + +cdv_wx_set_status(#state{app = cdv}, Status) -> + %% this module is used by the observer when cdw_wx isn't started + %% only try to set status when used by cdv + cdv_wx:set_status(Status); +cdv_wx_set_status(_, _) -> + ok. |