[nautilus] Bug 589375 - Crashes with empty location in edit bookmarks



commit af9f607c258270cd08e3b994017bc1ca134099fc
Author: A. Walton <awalton gnome org>
Date:   Wed Oct 7 15:48:04 2009 -0400

    Bug 589375 - Crashes with empty location in edit bookmarks
    
    Check that the length of the text in the entry is non-NULL.

 src/nautilus-bookmarks-window.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c
index 8070566..78a3a6b 100644
--- a/src/nautilus-bookmarks-window.c
+++ b/src/nautilus-bookmarks-window.c
@@ -814,6 +814,10 @@ update_bookmark_from_text (void)
 		g_assert (GTK_IS_ENTRY (name_field));
 		g_assert (GTK_IS_ENTRY (uri_field));
 
+		if (gtk_entry_get_text_length (GTK_ENTRY (uri_field)) == 0) {
+			return;
+		}
+
 		location = g_file_parse_name 
 			(gtk_entry_get_text (GTK_ENTRY (uri_field)));
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]