summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Walton <awalton@gnome.org>2009-10-07 15:48:04 -0400
committerAlexander Larsson <alexl@redhat.com>2009-10-20 13:09:14 +0200
commitaf69ce7e9ba5e5150e28aad3d78f8dc8117846ce (patch)
tree53bdbc565533e1d4be2752d34f31964bc7d59ba2
parented75d333fc18e039f6421d2dc96166e1a3bea6a1 (diff)
downloadnautilus-af69ce7e9ba5e5150e28aad3d78f8dc8117846ce.tar.gz
Bug 589375 - Crashes with empty location in edit bookmarks
Check that the length of the text in the entry is non-NULL.
-rw-r--r--src/nautilus-bookmarks-window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c
index 8070566d5..78a3a6ba6 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)));