From c8c0ecf1a7c718b8033f35c6cc41cab53e23c1e5 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 17 Sep 2001 22:02:40 +0000 Subject: Only raise NotReady if the local storage pointer is actually NULL. This * e-shell.c (impl_Shell_getLocalStorage): Only raise NotReady if the local storage pointer is actually NULL. This way it is possible for the components to access the local storage during initialization even if the shell is not quite finished initializing yet. svn path=/trunk/; revision=12914 --- shell/ChangeLog | 8 ++++++++ shell/e-shell.c | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 59e5929c19..97d964b872 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2001-09-17 Ettore Perazzoli + + * e-shell.c (impl_Shell_getLocalStorage): Only raise NotReady if + the local storage pointer is actually NULL. This way it is + possible for the components to access the local storage during + initialization even if the shell is not quite finished + initializing yet. + 2001-09-17 Ettore Perazzoli [Fix #9060, Shell crash after mailer crash.] diff --git a/shell/e-shell.c b/shell/e-shell.c index 461807a3d9..17f5bc2c72 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -425,13 +425,16 @@ impl_Shell_getLocalStorage (PortableServer_Servant servant, EShell *shell; EShellPrivate *priv; - if (raise_exception_if_not_ready (servant, ev)) - return CORBA_OBJECT_NIL; - bonobo_object = bonobo_object_from_servant (servant); shell = E_SHELL (bonobo_object); priv = shell->priv; + if (priv->local_storage == NULL) { + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_GNOME_Evolution_Shell_NotReady, NULL); + return CORBA_OBJECT_NIL; + } + local_storage_interface = e_local_storage_get_corba_interface (priv->local_storage); bonobo_object_dup_ref (local_storage_interface, ev); -- cgit v1.2.3