[nautilus] Don't crash when hiding search bar with no text
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't crash when hiding search bar with no text
- Date: Wed, 24 Mar 2010 16:04:50 +0000 (UTC)
commit a92a7bfcb2c7bb9f171724bc97b1c163f52c0fd7
Author: Tomas Bzatek <tbzatek redhat com>
Date: Wed Mar 24 17:00:21 2010 +0100
Don't crash when hiding search bar with no text
Happens in browser mode and only when search results pane is displayed
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 5bddd5e..7aab617 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);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]