On Mon, 2007-07-30 at 21:29 -0400, muppet wrote:

> While one possible answer is that everything is working just fine, i  
> think it prudent that Glib::Object::CLONE() should verify that  
> perl_gobjects exists before trying to call g_hash_table_foreach() on it.

Like so?

-- 
Bye,
-Torsten
Index: GObject.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v
retrieving revision 1.69
diff -u -d -p -r1.69 GObject.xs
--- GObject.xs	13 Aug 2007 18:37:39 -0000	1.69
+++ GObject.xs	7 Oct 2007 18:11:17 -0000
@@ -931,7 +931,9 @@ that process.
 void
 CLONE (gchar * class)
     CODE:
-    	if (perl_gobject_tracking && strcmp (class, "Glib::Object") == 0)
+	/* !perl_gobjects can happen when no object has been created yet. */
+    	if (perl_gobject_tracking && perl_gobjects &&
+	    strcmp (class, "Glib::Object") == 0)
 	{
 		G_LOCK (perl_gobjects);
 /*g_printerr ("we're in clone: %s\n", class);*/
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to