aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_wx.erl
diff options
context:
space:
mode:
authorvisciang <[email protected]>2017-01-26 11:18:12 +0100
committerSiri Hansen <[email protected]>2017-01-26 11:18:12 +0100
commit15dd52f771314b6eade47314afcd8b3206c694b1 (patch)
tree1f3a9fd6dc693de52f30e968d56748880399aedd /lib/observer/src/observer_wx.erl
parentcd4a95b0abb45f07eef8a77991c2be8f5dea575e (diff)
downloadotp-15dd52f771314b6eade47314afcd8b3206c694b1.tar.gz
otp-15dd52f771314b6eade47314afcd8b3206c694b1.tar.bz2
otp-15dd52f771314b6eade47314afcd8b3206c694b1.zip
Fix observer application crash (#1296)
Fix observer application crash When clicking an HTML-link to a port before the port tab has been opened for the first time, observer would crash since port info is not initiated. This is now corrected. Also, when clicking on an HTML link to a port, and the port does not exist, then pop up an info dialog saying "No such port". OTP-14151
Diffstat (limited to 'lib/observer/src/observer_wx.erl')
-rw-r--r--lib/observer/src/observer_wx.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 5732c12006..3031a1f90d 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -467,10 +467,10 @@ handle_info(_Info, State) ->
stop_servers(#state{node=Node, log=LogOn, sys_panel=Sys, pro_panel=Procs, tv_panel=TVs,
trace_panel=Trace, app_panel=Apps, perf_panel=Perfs,
- allc_panel=Alloc} = _State) ->
+ allc_panel=Alloc, port_panel=Ports} = _State) ->
LogOn andalso rpc:block_call(Node, rb, stop, []),
Me = self(),
- Tabs = [Sys, Procs, TVs, Trace, Apps, Perfs, Alloc],
+ Tabs = [Sys, Procs, Ports, TVs, Trace, Apps, Perfs, Alloc],
Stop = fun() ->
try
_ = [wx_object:stop(Panel) || Panel <- Tabs],
@@ -580,9 +580,10 @@ get_active_pid(#state{notebook=Notebook, pro_panel=Pro, sys_panel=Sys,
pid2panel(Pid, #state{pro_panel=Pro, sys_panel=Sys,
tv_panel=Tv, trace_panel=Trace, app_panel=App,
- perf_panel=Perf, allc_panel=Alloc}) ->
+ perf_panel=Perf, allc_panel=Alloc, port_panel=Port}) ->
case Pid of
Pro -> "Processes";
+ Port -> "Ports";
Sys -> "System";
Tv -> "Table Viewer" ;
Trace -> ?TRACE_STR;