From 5e5112b444634c49016026235eb1435c8a0ee7e4 Mon Sep 17 00:00:00 2001 From: padraigo Date: Fri, 3 Dec 2004 13:56:40 +0000 Subject: [PATCH] 2004-12-03 Padraig O'Briain * 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 | 6 ++++++ registryd/desktop.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f0f733..51062a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-03 Padraig O'Briain + + * 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 * configure.in, NEWS, README: Revved to 1.6.1. diff --git a/registryd/desktop.c b/registryd/desktop.c index a7865d6..59efaea 100644 --- a/registryd/desktop.c +++ b/registryd/desktop.c @@ -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 -- 2.7.4