From 3b4131bb116174e74ff7b94f63e590a426f7038a Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 22 Oct 2001 22:37:47 +0000 Subject: 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 --- shell/ChangeLog | 5 +++++ shell/e-shell-view.c | 24 ++---------------------- 2 files changed, 7 insertions(+), 22 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 9ce52dd4d5..91ca171de2 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Ettore Perazzoli + + * e-shell-view.c (show_existing_view): If the view is dead, just + return FALSE. Prevents crash #12483. + 2001-10-22 Ettore Perazzoli * e-shell.c: New member `is_interactive' in `EShellPrivate'. 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); -- cgit