From 54ea765e753c91710513e15e3be54ce86077c461 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 30 Oct 2001 22:11:08 +0000 Subject: Duplicate the owner before pinging it. Fixes #13802. * evolution-shell-component.c (owner_ping_callback): Duplicate the owner before pinging it. Fixes #13802. svn path=/trunk/; revision=14488 --- shell/ChangeLog | 5 +++++ shell/evolution-shell-component.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 75d2d825c5..9950766fc5 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2001-10-30 Ettore Perazzoli + + * evolution-shell-component.c (owner_ping_callback): Duplicate the + owner before pinging it. Fixes #13802. + 2001-10-30 Ettore Perazzoli * evolution-shell-component.c (impl_owner_unset): New. 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; -- cgit v1.2.3