Fixed ugly bug in assertion return value.
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 13 Mar 2002 21:31:33 +0000 (21:31 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 13 Mar 2002 21:31:33 +0000 (21:31 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@252 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/accessible.c

index 70aa68c..bf346af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-13  Bill Haneman <bill.haneman@sun.com>
+
+       * libspi/accessible.c 
+       (impl_accessibility_accessible_get_child_at_index):
+       Change return value for g_return_if_fail ()
+       to CORBA_OBJECT_NIL instead of "0" (!)
+
 2002-03-13  Michael Meeks  <michael@ximian.com>
 
        * atk-bridge/bridge.c (atk_bridge_init): don't register
index 20a589e..9cbd0cf 100644 (file)
@@ -292,7 +292,7 @@ impl_accessibility_accessible_get_child_at_index (PortableServer_Servant servant
   AtkObject *child;
   AtkObject *object = get_atkobject_from_servant (servant);
 
-  g_return_val_if_fail (object != NULL, 0);
+  g_return_val_if_fail (object != NULL, CORBA_OBJECT_NIL);
 
   child = atk_object_ref_accessible_child (object, index);
 
@@ -440,7 +440,7 @@ de_register_public_ref (SpiBase *object)
 SpiAccessible *
 spi_accessible_new (AtkObject *o)
 {
-  return spi_accessible_construct (SPI_ACCESSIBLE_TYPE, o);
+  return spi_accessible_construct (SPI_ACCESSIBLE_TYPE, o);      
 }
 
 SpiAccessible *
@@ -459,7 +459,6 @@ spi_accessible_construct (GType type, AtkObject *o)
         bonobo_object_ref (BONOBO_OBJECT (retval));
        return retval;
       }
-
     else
       {
         retval = g_object_new (type, NULL);
@@ -555,11 +554,11 @@ spi_accessible_new_return (AtkObject         *o,
     }
   else if (SPI_IS_REMOTE_OBJECT (o))
     {
-      retval = spi_remote_object_get_accessible (SPI_REMOTE_OBJECT (o)); 
+      retval = spi_remote_object_get_accessible (SPI_REMOTE_OBJECT (o));
     }
   else
     {
-      accessible = spi_accessible_new (o);
+      accessible = spi_accessible_construct (SPI_ACCESSIBLE_TYPE, o);
       retval = CORBA_Object_duplicate (BONOBO_OBJREF (accessible), ev); 
     }