diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2010-03-24 17:00:21 +0100 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2010-03-24 17:00:21 +0100 |
commit | a92a7bfcb2c7bb9f171724bc97b1c163f52c0fd7 (patch) | |
tree | 3fbd26b156f19ef39a55b9291958f524532dd52b | |
parent | 4702bc8e74248de734c2fbcddd57191ba2fc1bd1 (diff) | |
download | nautilus-a92a7bfcb2c7bb9f171724bc97b1c163f52c0fd7.tar.gz |
Don't crash when hiding search bar with no text
Happens in browser mode and only when search results pane is displayed
-rw-r--r-- | src/nautilus-navigation-window-menus.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c index 5bddd5ec1..7aab617a1 100644 --- a/src/nautilus-navigation-window-menus.c +++ b/src/nautilus-navigation-window-menus.c @@ -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); + } } } |