diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-view.c | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index a1aca471b4..644fdf6f0e 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2001-07-03 Ettore Perazzoli <ettore@ximian.com> + + [Fixed #3643, Shell crash when component crashed] + + * e-shell-view.c (socket_destroy_cb): Fix Jason's broken fix for + #3205 that was causing #3643. It is not safe to strcmp() the + return value from `e_shell_view_get_current_uri()' as it might be + NULL already. + 2001-07-02 Christopher James Lahey <clahey@ximian.com> * Makefile.am (INCLUDES): Added $(BONOBO_CONF_CFLAGS). diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index ae72420da6..8bfd90a163 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1578,6 +1578,7 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) const char *uri; gboolean viewing_closed_uri; char *copy_of_uri; + const char *current_uri; shell_view = E_SHELL_VIEW (data); priv = shell_view->priv; @@ -1602,7 +1603,15 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) get_storage_set_path_from_uri (uri)); /* See if we were actively viewing the uri for the socket that's being closed */ - viewing_closed_uri = !strcmp (uri, e_shell_view_get_current_uri (shell_view)); + current_uri = e_shell_view_get_current_uri (shell_view); + if (current_uri == NULL) { + viewing_closed_uri = FALSE; + } else { + if (strcmp (uri, current_uri) == 0) + viewing_closed_uri = TRUE; + else + viewing_closed_uri = FALSE; + } if (viewing_closed_uri) e_shell_view_display_uri (shell_view, NULL); |