Skip to content

Commit

Permalink
observer: Fix crash in process_window
Browse files Browse the repository at this point in the history
Links can be to named processes, convert atom to list
  • Loading branch information
dgud committed Mar 27, 2015
1 parent d477e59 commit 21a1802
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/observer/src/observer_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,11 @@ link_entry2(Panel,{Target,Str},Cursor) ->
wxWindow:setToolTip(TC, ToolTip),
TC.

to_link(Tuple = {_Target, _Str}) ->
Tuple;
to_link(RegName={Name, Node}) when is_atom(Name), is_atom(Node) ->
Str = io_lib:format("{~p,~p}", [Name, Node]),
{RegName, Str};
to_link(TI = {_Target, _Identifier}) ->
TI;
to_link(Target0) ->
Target=to_str(Target0),
{Target, Target}.
Expand Down
3 changes: 1 addition & 2 deletions lib/observer/src/observer_wx.erl
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ return_to_localnode(Frame, Node) ->
end.

create_txt_dialog(Frame, Msg, Title, Style) ->
MD = wxMessageDialog:new(Frame, Msg, [{style, Style}]),
wxMessageDialog:setTitle(MD, Title),
MD = wxMessageDialog:new(Frame, Msg, [{style, Style}, {caption,Title}]),
wxDialog:showModal(MD),
wxDialog:destroy(MD).

Expand Down

0 comments on commit 21a1802

Please sign in to comment.