From 031f0600a686b7d0ce8948a92e78431f79d40292 Mon Sep 17 00:00:00 2001 From: Martin Wehner Date: Wed, 18 Jul 2007 22:07:07 +0000 Subject: Handle the fact that the gtk+ 2.11.x combobox emits the changed signal on 2007-07-18 Martin Wehner * src/nautilus-navigation-window.c: (view_as_menu_switch_views_callback): Handle the fact that the gtk+ 2.11.x combobox emits the changed signal on removing the active entry without crash. svn path=/trunk/; revision=13002 --- src/nautilus-navigation-window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nautilus-navigation-window.c') diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 8890f0dca..42e7f81a4 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -854,8 +854,10 @@ view_as_menu_switch_views_callback (GtkComboBox *combo_box, NautilusWindow *wind g_assert (NAUTILUS_IS_WINDOW (window)); active = gtk_combo_box_get_active (combo_box); - - if (active < GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo_box), "num viewers")) ) { + + if (active < 0) { + return; + } else if (active < GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo_box), "num viewers"))) { activate_nth_short_list_item (window, active); } else { activate_extra_viewer (window); -- cgit v1.2.1