From cc0facedacf4d31e47d265cac871d334b6b566d1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 30 Jun 2000 10:04:45 +0000 Subject: Added missing CORBA_Object_duplicate() when storing the shell object pointer in ::set_owner. svn path=/trunk/; revision=3826 --- shell/ChangeLog | 5 +++++ shell/evolution-shell-component.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index a5acff39cf..d7f70b0d15 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2000-06-30 Ettore Perazzoli + + * evolution-shell-component.c (impl_ShellComponent_set_owner): + Duplicate the object before storing it, you doofus. + 2000-06-30 Ettore Perazzoli * evolution-shell-component.c (impl_ShellComponent_unset_owner): diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index d110a424d7..4069086c85 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -127,6 +127,7 @@ impl_ShellComponent_set_owner (PortableServer_Servant servant, BonoboObject *bonobo_object; EvolutionShellComponent *shell_component; EvolutionShellComponentPrivate *priv; + Evolution_Shell shell_duplicate; bonobo_object = bonobo_object_from_servant (servant); shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); @@ -138,11 +139,12 @@ impl_ShellComponent_set_owner (PortableServer_Servant servant, return; } - priv->owner_client = evolution_shell_client_new (shell); + shell_duplicate = CORBA_Object_duplicate (shell, ev); - g_print ("%s -- %p\n", __FUNCTION__, shell); - - gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->owner_client); + if (ev->_major == CORBA_NO_EXCEPTION) { + priv->owner_client = evolution_shell_client_new (shell_duplicate); + gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->owner_client); + } } static void -- cgit