[PATCH 1/2] Don't crash when hiding search bar with no text
- From: Tomas Bzatek <tbzatek redhat com>
- Subject: [PATCH 1/2] Don't crash when hiding search bar with no text
- Date: Tue, 23 Mar 2010 16:44:07 +0100
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);
+ }
}
}
--
1.7.0.1
--=-p9ic9yKUHpNiNXhqSMF3
Content-Disposition: attachment; filename="0002-Unref-local-query-object-when-turning-search-off.patch"
Content-Type: text/x-patch; name="0002-Unref-local-query-object-when-turning-search-off.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]