aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/e-shell-view.c24
2 files changed, 7 insertions, 22 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 9ce52dd4d5..91ca171de2 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,10 @@
2001-10-22 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-view.c (show_existing_view): If the view is dead, just
+ return FALSE. Prevents crash #12483.
+
+2001-10-22 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell.c: New member `is_interactive' in `EShellPrivate'.
(init): Init to %FALSE.
(set_interactive): New.
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);