From a5dc2cc501e436a7593c1d2b3adfdac2acbd20c8 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Sun, 18 Mar 2018 17:40:08 +0200 Subject: query-editor: Return if location unset when creating query Since the location of the query editor is nullable, we cannot rely on it having a value. An example of such situation is triggering a search while the window slot has no view set and, therefore, no location, which can happen when opening remote locations. --- src/nautilus-query-editor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c index 0041ff5b4..a2291a87a 100644 --- a/src/nautilus-query-editor.c +++ b/src/nautilus-query-editor.c @@ -391,6 +391,11 @@ create_query (NautilusQueryEditor *editor) fts_enabled = nautilus_search_popover_get_fts_enabled (NAUTILUS_SEARCH_POPOVER (priv->popover)); + if (priv->location == NULL) + { + return; + } + file = nautilus_file_get (priv->location); query = nautilus_query_new (); -- cgit v1.2.1