aboutsummaryrefslogtreecommitdiffstats
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
parent9dbf178166992b8e05679ae7a17a8058e5f8c8e6 (diff)
downloadgsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.gz
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.bz2
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.lz
gsoc2013-evolution-dcd5194f42a066d8f4f16d73abc82327fae430b0.tar.xz
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
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-shell-view.c11
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);