summaryrefslogtreecommitdiff
path: root/src/nautilus-bookmarks-window.c
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2001-03-23 19:49:12 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2001-03-23 19:49:12 +0000
commit78cef502dca0d3ef64a723d70625407e1713ae1f (patch)
tree080fc6403e6285c656984f42ec9bde6b8a18ee2a /src/nautilus-bookmarks-window.c
parentfece26839479e70cbe0bb18d2e7501bb5b9c3032 (diff)
downloadnautilus-78cef502dca0d3ef64a723d70625407e1713ae1f.tar.gz
Fixed bug 7846: crash removing only bookmark in Bookmarks window.
GtkCList is emitting a select_row signal on a non-existent row, which caused a Nautilus parameter check to fail. Worked around this in Nautilus. I don't know when this started happening in GTK, but I'm sure it didn't crash here when the bookmarks window was last tested. I've sent mail to gtk-devel-list about the GtkCList issue. * src/nautilus-bookmarks-window.c: (on_select_row): Bail out without doing anything if selected row is not a valid row number.
Diffstat (limited to 'src/nautilus-bookmarks-window.c')
-rw-r--r--src/nautilus-bookmarks-window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c
index 29b946c35..6969e7ada 100644
--- a/src/nautilus-bookmarks-window.c
+++ b/src/nautilus-bookmarks-window.c
@@ -451,6 +451,11 @@ on_select_row (GtkCList *clist,
g_assert (GTK_IS_ENTRY (name_field));
g_assert (GTK_IS_ENTRY (uri_field));
+ /* Workaround for apparent GtkCList bug. See bugzilla.eazel.com 7846. */
+ if (clist->rows <= row) {
+ return;
+ }
+
selected = get_selected_bookmark ();
name = nautilus_bookmark_get_name (selected);
uri = nautilus_bookmark_get_uri (selected);