aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-23 06:37:47 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-23 06:37:47 +0800
commit3b4131bb116174e74ff7b94f63e590a426f7038a (patch)
tree074315f296678d43cdf2baa8007d7cae0af371cf /shell/e-shell-view.c
parente74ade400c7871aed04d239b0bd0c3fa1f897304 (diff)
downloadgsoc2013-evolution-3b4131bb116174e74ff7b94f63e590a426f7038a.tar.gz
gsoc2013-evolution-3b4131bb116174e74ff7b94f63e590a426f7038a.tar.zst
gsoc2013-evolution-3b4131bb116174e74ff7b94f63e590a426f7038a.zip
If the view is dead, just return FALSE. Prevents crash #12483.
* e-shell-view.c (show_existing_view): If the view is dead, just return FALSE. Prevents crash #12483. svn path=/trunk/; revision=13903
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 06843e64e5..7d0f67c338 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1943,28 +1943,8 @@ show_existing_view (EShellView *shell_view,
/* A BonoboWidget can be a "zombie" in the sense that its actual
control is dead; if it's zombie, we have to recreate it. */
- if (bonobo_widget_is_dead (BONOBO_WIDGET (view->control))) {
- GtkWidget *parent;
-
- parent = view->control->parent;
-
- /* Out with the old. */
- gtk_container_remove (GTK_CONTAINER (parent), view->control);
- g_hash_table_remove (priv->uri_to_view, view->uri);
- view_destroy (view);
-
- /* In with the new. */
- view = get_view_for_uri (shell_view, uri);
- if (view == NULL)
- return FALSE;
-
- gtk_container_add (GTK_CONTAINER (parent), view->control);
-
- g_hash_table_insert (priv->uri_to_view, view->uri, view);
-
- /* Show. */
- gtk_widget_show (view->control);
- }
+ if (bonobo_widget_is_dead (BONOBO_WIDGET (view->control)))
+ return FALSE;
g_free (priv->uri);
priv->uri = g_strdup (uri);