From: billh Date: Wed, 13 Mar 2002 21:31:33 +0000 (+0000) Subject: Fixed ugly bug in assertion return value. X-Git-Tag: AT_SPI2_ATK_2_12_0~1408 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2bbb302b6e436a7b498e32b479ecc4a4225b975;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git Fixed ugly bug in assertion return value. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@252 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index 70aa68c..bf346af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-03-13 Bill Haneman + + * 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 * atk-bridge/bridge.c (atk_bridge_init): don't register diff --git a/libspi/accessible.c b/libspi/accessible.c index 20a589e..9cbd0cf 100644 --- a/libspi/accessible.c +++ b/libspi/accessible.c @@ -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); }