aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/evolution-shell-component.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 75d2d825c5..9950766fc5 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,10 @@
2001-10-30 Ettore Perazzoli <ettore@ximian.com>
+ * evolution-shell-component.c (owner_ping_callback): Duplicate the
+ owner before pinging it. Fixes #13802.
+
+2001-10-30 Ettore Perazzoli <ettore@ximian.com>
+
* evolution-shell-component.c (impl_owner_unset): New.
(class_init): Install it.
(impl_unsetOwner): Just emit the "owner_unset" signal as the
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index 37971be54e..a253b9278c 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -180,6 +180,7 @@ owner_ping_callback (void *data)
EvolutionShellComponent *shell_component;
EvolutionShellComponentPrivate *priv;
Bonobo_Unknown owner_objref;
+ CORBA_Environment ev;
gboolean alive;
shell_component = EVOLUTION_SHELL_COMPONENT (data);
@@ -190,7 +191,18 @@ owner_ping_callback (void *data)
if (owner_objref == CORBA_OBJECT_NIL)
return FALSE;
+ /* We are duplicating the object here, as we might get an ::unsetOwner
+ while we invoke the pinging, and this would make the objref invalid
+ and thus crash the stubs (cfr. #13802). */
+
+ CORBA_exception_init (&ev);
+ owner_objref = CORBA_Object_duplicate (owner_objref, &ev);
+
alive = bonobo_unknown_ping (owner_objref);
+
+ CORBA_Object_release (owner_objref, &ev);
+ CORBA_exception_free (&ev);
+
if (alive)
return TRUE;