From 12cce9d67fe2644a986820dcdbeecc34ff929b29 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 2 Feb 2012 11:02:09 +0100 Subject: [observer] Fix crash when loosing connections --- lib/observer/src/observer_app_wx.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/observer/src/observer_app_wx.erl') 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}. -- cgit v1.2.3