After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322290 - Crash on Tag context menu
Crash on Tag context menu
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
CVS
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 322381 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-11-24 03:33 UTC by Daniel Svensson
Modified: 2005-12-01 02:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Svensson 2005-11-24 03:33:59 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;
+			}
 		}
 	}
Comment 1 Daniel Svensson 2005-11-24 17:24:12 UTC
Oh.. crap.. this is a duplicate of 315261, thought I showed the complete list of
bugs. :/
Comment 2 Daniel Svensson 2005-11-24 17:28:29 UTC
oh.. only triggers the same bug, reproduced in another way.
Comment 3 Gabriel Burt 2005-11-26 21:14:38 UTC
*** Bug 322381 has been marked as a duplicate of this bug. ***
Comment 4 Gabriel Burt 2005-12-01 02:21:04 UTC
Thanks Daniel, this is fixed now in CVS.