You can have instance_real_class_bsa be non-NULL, but still the class not
authorOwen Taylor <otaylor@redhat.com>
Fri, 26 Sep 2003 21:26:42 +0000 (21:26 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 26 Sep 2003 21:26:42 +0000 (21:26 +0000)
Fri Sep 26 17:24:53 2003  Owen Taylor  <otaylor@redhat.com>

        * gtype.c (g_type_instance_get_private): You can
        have instance_real_class_bsa be non-NULL, but still
        the class not be in the bsa. (Found by Kris Rietveld)

gobject/ChangeLog
gobject/gtype.c

index 5c78196..a21ec57 100644 (file)
@@ -1,3 +1,9 @@
+Fri Sep 26 17:24:53 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gtype.c (g_type_instance_get_private): You can
+       have instance_real_class_bsa be non-NULL, but still 
+       the class not be in the bsa. (Found by Kris Rietveld)
+
 2003-09-15  Matthias Clasen  <maclas@gmx.de>
 
        * glib-genmarshal.c (complete_out_arg): Don't generate code 
index 2c78542..1339b06 100644 (file)
@@ -3401,7 +3401,11 @@ g_type_instance_get_private (GTypeInstance *instance,
    * so figure the instances real class first
    */
   if (instance_real_class_bsa)
-    class = instance_real_class_get (instance);
+    {
+      class = instance_real_class_get (instance);
+      if (!class)
+       class = instance->g_class;
+    }
   else
     class = instance->g_class;