Commit a92a7bfc by Tomas Bzatek

Don't crash when hiding search bar with no text

Happens in browser mode and only when search results pane is displayed
parent 4702bc8e
......@@ -698,10 +698,12 @@ action_show_hide_search_callback (GtkAction *action,
char *uri;
query = nautilus_query_editor_get_query (slot->query_editor);
uri = nautilus_query_get_location (query);
if (uri != NULL) {
location = g_file_new_for_uri (uri);
g_free (uri);
if (query != NULL) {
uri = nautilus_query_get_location (query);
if (uri != NULL) {
location = g_file_new_for_uri (uri);
g_free (uri);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment