diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-03-18 17:42:36 +0200 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2018-03-19 08:42:25 +0200 |
commit | fddcda2d962cee2393002ddec5dfc0fda39e90f8 (patch) | |
tree | e645daf52a9627139820f732591e9d43726fc7f7 | |
parent | a5dc2cc501e436a7593c1d2b3adfdac2acbd20c8 (diff) | |
download | nautilus-fddcda2d962cee2393002ddec5dfc0fda39e90f8.tar.gz |
window-slot: Don’t show query editor with no view
Since the view can be null at the time the user is pressing keys, doing
anything with it may lead to a crash.
-rw-r--r-- | src/nautilus-window-slot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index 45a2bc60e..c3260aeb0 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -509,6 +509,10 @@ show_query_editor (NautilusWindowSlot *self) priv = nautilus_window_slot_get_instance_private (self); view = nautilus_window_slot_get_current_view (self); + if (view == NULL) + { + return; + } if (nautilus_view_is_searching (view)) { @@ -2782,8 +2786,6 @@ nautilus_window_slot_dispose (GObject *object) nautilus_window_slot_remove_extra_location_widgets (self); - nautilus_window_slot_set_active (self, FALSE); - if (priv->content_view) { gtk_widget_destroy (GTK_WIDGET (priv->content_view)); |