GNOME Bugzilla – Bug 322290
Crash on Tag context menu
Last modified: 2005-12-01 02:21:04 UTC
Version details: 2005-11-24 Distribution/Version: Debian A context menu is being opened even though the mouse is not over a Tag, this leads to... tag_selection_widget.TagAtPosition((int)args.Event.X, (int)args.Event.Y) ...a null pointer which make f-spot crash and burn. cvs diff -uN below: Index: src/MainWindow.cs =================================================================== RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v retrieving revision 1.234 diff -u -r1.234 MainWindow.cs --- src/MainWindow.cs 16 Nov 2005 00:39:20 -0000 1.234 +++ src/MainWindow.cs 24 Nov 2005 03:22:28 -0000 @@ -606,10 +606,13 @@ { if (args.Event.Button == 3) { - TagPopup popup = new TagPopup (); - popup.Activate (args.Event, tag_selection_widget.TagAtPosition ((int)args.Event.X, (int)args.Event.Y), - tag_selection_widget.TagHighlight ()); - args.RetVal = true; + Tag tag = tag_selection_widget.TagAtPosition((int)args.Event.X, (int)args.Event.Y); + if (tag != null) { + TagPopup popup = new TagPopup (); + popup.Activate (args.Event, tag_selection_widget.TagAtPosition ((int)args.Event.X, (int)args.Event.Y), + tag_selection_widget.TagHighlight ()); + args.RetVal = true; + } } }
Oh.. crap.. this is a duplicate of 315261, thought I showed the complete list of bugs. :/
oh.. only triggers the same bug, reproduced in another way.
*** Bug 322381 has been marked as a duplicate of this bug. ***
Thanks Daniel, this is fixed now in CVS.