[maemo-commits] [maemo-commits] r17669 - projects/haf/trunk/glib/gobject

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Mar 13 11:11:15 EET 2009
Author: kris
Date: 2009-03-13 11:11:13 +0200 (Fri, 13 Mar 2009)
New Revision: 17669

Modified:
   projects/haf/trunk/glib/gobject/ChangeLog
   projects/haf/trunk/glib/gobject/gsignal.c
Log:
2009-03-13  Kristian Rietveld  <kris at imendio.com>

	Fixes NB#105436: GLIB CRITICALSs when tapping insensitive widget if
	hildon_gtk_menu_new called.

	* gsignal.c (signal_lookup_closure): when defaulting to the only item
	in the array, check if this is indeed the default closure.



Modified: projects/haf/trunk/glib/gobject/ChangeLog
===================================================================
--- projects/haf/trunk/glib/gobject/ChangeLog	2009-03-13 09:04:06 UTC (rev 17668)
+++ projects/haf/trunk/glib/gobject/ChangeLog	2009-03-13 09:11:13 UTC (rev 17669)
@@ -1,3 +1,11 @@
+2009-03-13  Kristian Rietveld  <kris at imendio.com>
+
+	Fixes NB#105436: GLIB CRITICALSs when tapping insensitive widget if
+	hildon_gtk_menu_new called.
+
+	* gsignal.c (signal_lookup_closure): when defaulting to the only item
+	in the array, check if this is indeed the default closure.
+
 2008-09-17  Matthias Clasen  <mclasen at redhat.com>
 
 	* === Released 2.18.1 ===

Modified: projects/haf/trunk/glib/gobject/gsignal.c
===================================================================
--- projects/haf/trunk/glib/gobject/gsignal.c	2009-03-13 09:04:06 UTC (rev 17668)
+++ projects/haf/trunk/glib/gobject/gsignal.c	2009-03-13 09:11:13 UTC (rev 17669)
@@ -1448,9 +1448,12 @@
   ClassClosure *cc;
 
   if (node->class_closure_bsa && g_bsearch_array_get_n_nodes (node->class_closure_bsa) == 1)
-    cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
-  else
-    cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
+    {
+      cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
+      if (cc && cc->instance_type == 0) /* check for default closure */
+        return cc->closure;
+    }
+  cc = signal_find_class_closure (node, G_TYPE_FROM_INSTANCE (instance));
   return cc ? cc->closure : NULL;
 }
 


More information about the maemo-commits mailing list