aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-03 19:26:20 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-03 19:26:20 +0800
commitdcd5194f42a066d8f4f16d73abc82327fae430b0 (patch)
tree350af33ae85b88de92b5011b138ed15e1a0f188b /shell/e-shell-view.c
parent9dbf178166992b8e05679ae7a17a8058e5f8c8e6 (diff)
downloadgsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.gz
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.zst
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.zip
[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. svn path=/trunk/; revision=10739
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c11
1 files changed, 10 insertions, 1 deletions
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);