diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-01-12 11:55:18 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-01-13 10:57:11 +0100 |
commit | 17e89f605c708e9d341308694eb770beb66dfbb7 (patch) | |
tree | a8999dbb839ba58d8ee304e1a3dae630075fb3d0 | |
parent | 0a90763726595798a6ee225d3b0f1b1512f4c60c (diff) | |
download | nautilus-17e89f605c708e9d341308694eb770beb66dfbb7.tar.gz |
window-slot: protect against no new view
If not a critical is raised.
-rw-r--r-- | src/nautilus-window-slot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index f775a14f3..762e746e1 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -2222,7 +2222,8 @@ nautilus_window_slot_switch_new_content_view (NautilusWindowSlot *slot) GtkWidget *widget; gboolean reusing_view; - reusing_view = gtk_widget_get_parent (GTK_WIDGET (slot->details->new_content_view)) != NULL; + reusing_view = slot->details->new_content_view && + gtk_widget_get_parent (GTK_WIDGET (slot->details->new_content_view)) != NULL; /* We are either reusing the view, so new_content_view and content_view * are the same, or the new_content_view is invalid */ if (slot->details->new_content_view == NULL || reusing_view) |