aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_virtual_list_wx.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-05-27 12:48:00 +0200
committerSiri Hansen <[email protected]>2014-05-27 14:17:41 +0200
commitdbd2604939e92c110277d941589b8965fdda4270 (patch)
tree7f073ac6c07cc710d3cdac0254e0cae0f36dfd55 /lib/observer/src/cdv_virtual_list_wx.erl
parent339b6416664c7dc64d72c21653138137e8d1018f (diff)
downloadotp-dbd2604939e92c110277d941589b8965fdda4270.tar.gz
otp-dbd2604939e92c110277d941589b8965fdda4270.tar.bz2
otp-dbd2604939e92c110277d941589b8965fdda4270.zip
[cdv] Allow registered name as owner of timer in crashdump
crashdump_viewer would crash if the owner of a timer was specified as the process' regisered name. This has been corrected.
Diffstat (limited to 'lib/observer/src/cdv_virtual_list_wx.erl')
-rw-r--r--lib/observer/src/cdv_virtual_list_wx.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/observer/src/cdv_virtual_list_wx.erl b/lib/observer/src/cdv_virtual_list_wx.erl
index c5a7d9a2e5..bfe115a42e 100644
--- a/lib/observer/src/cdv_virtual_list_wx.erl
+++ b/lib/observer/src/cdv_virtual_list_wx.erl
@@ -269,7 +269,7 @@ handle_event(#wx{event=#wxList{type=command_list_item_right_click,
MenuId = ?ID_DETAILS + Col,
ColText = call(Holder, {get_row, self(), Row, Col}),
case ColText of
- "[]" -> [];
+ Empty when Empty=="[]"; Empty=="" -> [];
_ ->
What =
case catch list_to_integer(ColText) of
@@ -284,8 +284,13 @@ handle_event(#wx{event=#wxList{type=command_list_item_right_click,
end
end,
MenuCols),
- wxWindow:popupMenu(Panel, Menu),
- wxMenu:destroy(Menu),
+ case MenuItems of
+ [] ->
+ wxMenu:destroy(Menu);
+ _ ->
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu)
+ end,
{noreply,State#state{menu_items=MenuItems}};
handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},