2004-12-03 Padraig O'Briain <padraig.obriain@sun.com>
authorpadraigo <padraigo@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 3 Dec 2004 13:56:40 +0000 (13:56 +0000)
committerpadraigo <padraigo@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Fri, 3 Dec 2004 13:56:40 +0000 (13:56 +0000)
* registryd/desktop.c: Add checking that we are not exiting before
calling spi_desktop_remove_application in
abnormal_application_termination. Fix for bug #152147.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@723 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
registryd/desktop.c

index 7f0f733..51062a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-03  Padraig O'Briain <padraig.obriain@sun.com>
+
+       * registryd/desktop.c: Add checking that we are not exiting before
+       calling spi_desktop_remove_application in 
+       abnormal_application_termination. Fix for bug #152147.
+
 2004-12-02  Bill Haneman <billh@gnome.org>
 
        * configure.in, NEWS, README: Revved to 1.6.1.
index a7865d6..59efaea 100644 (file)
@@ -48,6 +48,8 @@ typedef struct {
        Accessibility_Application ref;
 } Application;
 
+static gboolean exiting = FALSE;
+
 /* A pointer to our parent object class */
 static SpiAccessibleClass *parent_class;
 
@@ -210,6 +212,12 @@ impl_desktop_get_child_at_index (PortableServer_Servant servant,
 }
 
 static void
+spi_desktop_exiting (void)
+{
+  exiting = TRUE;
+}
+
+static void
 spi_desktop_class_init (SpiDesktopClass *klass)
 {
   GObjectClass * object_class = (GObjectClass *) klass;
@@ -240,6 +248,7 @@ spi_desktop_class_init (SpiDesktopClass *klass)
                  1, G_TYPE_UINT);
   epv->_get_childCount = impl_desktop_get_child_count;
   epv->getChildAtIndex = impl_desktop_get_child_at_index;
+  g_atexit (spi_desktop_exiting);
 }
 
 BONOBO_TYPE_FUNC_FULL (SpiDesktop,
@@ -265,7 +274,8 @@ abnormal_application_termination (gpointer object, Application *app)
 {
   g_return_if_fail (SPI_IS_DESKTOP (app->desktop));
 
-  spi_desktop_remove_application (app->desktop, app->ref);
+  if (!exiting)
+    spi_desktop_remove_application (app->desktop, app->ref);
 }
 
 void