diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-10-31 06:11:08 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-10-31 06:11:08 +0800 |
commit | 54ea765e753c91710513e15e3be54ce86077c461 (patch) | |
tree | ac3d1b43bf600b0fa507f235f55f14450033ee70 /shell/evolution-shell-component.c | |
parent | 02ffaef8e15338007818af8687433527a37517e3 (diff) | |
download | gsoc2013-evolution-54ea765e753c91710513e15e3be54ce86077c461.tar.gz gsoc2013-evolution-54ea765e753c91710513e15e3be54ce86077c461.tar.zst gsoc2013-evolution-54ea765e753c91710513e15e3be54ce86077c461.zip |
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
Diffstat (limited to 'shell/evolution-shell-component.c')
-rw-r--r-- | shell/evolution-shell-component.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; |