From fef8a881026a6dac9e73a5b7d928811b66e77495 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 4 Sep 2001 22:57:18 +0000 Subject: Just ignore the request if the activity handler has the * e-activity-handler.c (impl_operationProgressing): Just ignore the request if the activity handler has the GTK_OBJECT_DESTROYED() flag set. This should prevent crashes like #7542 and friends when the components are not well-behaved enough to respect the Bonobo refcounting. (impl_operationStarted): Likewise. (impl_operationFinished): Likewise. (impl_requestDialog): Likewise. svn path=/trunk/; revision=12609 --- shell/e-activity-handler.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'shell/e-activity-handler.c') diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c index 8624f4f077..798eef551e 100644 --- a/shell/e-activity-handler.c +++ b/shell/e-activity-handler.c @@ -385,6 +385,10 @@ impl_operationStarted (PortableServer_Servant servant, GSList *p; activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); + + if (GTK_OBJECT_DESTROYED (activity_handler)) + return; + priv = activity_handler->priv; if (icon->_length == 0) { @@ -430,6 +434,10 @@ impl_operationProgressing (PortableServer_Servant servant, /* FIXME? The complexity in this function sucks. */ activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); + + if (GTK_OBJECT_DESTROYED (activity_handler)) + return; + priv = activity_handler->priv; p = lookup_activity (priv->activity_infos, activity_id, &order_number); @@ -469,6 +477,10 @@ impl_operationFinished (PortableServer_Servant servant, int order_number; activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); + + if (GTK_OBJECT_DESTROYED (activity_handler)) + return; + priv = activity_handler->priv; p = lookup_activity (priv->activity_infos, activity_id, &order_number); @@ -490,6 +502,13 @@ impl_requestDialog (PortableServer_Servant servant, const GNOME_Evolution_Activity_DialogType dialog_type, CORBA_Environment *ev) { + EActivityHandler *activity_handler; + + activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant)); + + if (GTK_OBJECT_DESTROYED (activity_handler)) + return; + /* FIXME implement. */ g_warning ("Evolution::Activity::requestDialog not implemented"); -- cgit v1.2.3