aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_app_wx.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-02-02 11:02:09 +0100
committerDan Gudmundsson <[email protected]>2012-02-21 15:06:43 +0100
commit12cce9d67fe2644a986820dcdbeecc34ff929b29 (patch)
tree6540042c602443c01d83ba2226a30e0618b385e9 /lib/observer/src/observer_app_wx.erl
parent49da7aaaed1f8f998bd3d6f1f029236fab9b3d4b (diff)
downloadotp-12cce9d67fe2644a986820dcdbeecc34ff929b29.tar.gz
otp-12cce9d67fe2644a986820dcdbeecc34ff929b29.tar.bz2
otp-12cce9d67fe2644a986820dcdbeecc34ff929b29.zip
[observer] Fix crash when loosing connections
Diffstat (limited to 'lib/observer/src/observer_app_wx.erl')
-rw-r--r--lib/observer/src/observer_app_wx.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl
index 62046577ad..7b4f7c4ce5 100644
--- a/lib/observer/src/observer_app_wx.erl
+++ b/lib/observer/src/observer_app_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -106,6 +106,7 @@ init([Notebook, Parent]) ->
LinkPen = wxPen:new(SelCol, [{width, 2}]),
%% GC = wxGraphicsContext:create(DrawingArea),
%% _Font = wxGraphicsContext:createFont(GC, DefFont),
+ process_flag(trap_exit, true),
{Panel, #state{parent=Parent,
panel =Panel,
apps_w=Apps,
@@ -269,6 +270,10 @@ handle_info({delivery, Pid, app, Curr, AppData},
wxWindow:layout(Panel),
{noreply, State#state{app=App, sel=undefined}};
+handle_info({'EXIT', _, noconnection}, State) ->
+ {noreply, State};
+handle_info({'EXIT', _, normal}, State) ->
+ {noreply, State};
handle_info(_Event, State) ->
%% io:format("~p:~p: ~p~n",[?MODULE,?LINE,_Event]),
{noreply, State}.