summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-08-09 02:53:31 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-08-09 02:53:31 +0000
commitb04a72a5d85b0d7377b09d3dcbd376244fcf7dc8 (patch)
tree10d7e40e353822ce5f4f02b43d648bf478c4bc10 /gtk/gtkcombobox.c
parent0528aeae3ad33420cc69216c9594a79f3bf89697 (diff)
downloadgtk+-b04a72a5d85b0d7377b09d3dcbd376244fcf7dc8.tar.gz
Don't stumble over separators which are not backed by model rows.
Sun Aug 8 22:52:26 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over separators which are not backed by model rows.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 1a58008ee6..535b32538c 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2733,7 +2733,12 @@ find_menu_by_path (GtkWidget *menu,
{
if (GTK_IS_SEPARATOR_MENU_ITEM (i->data))
{
- mpath = gtk_tree_path_copy (g_object_get_data (G_OBJECT (i->data), "gtk-combo-box-item-path"));
+
+ mpath = g_object_get_data (G_OBJECT (i->data), "gtk-combo-box-item-path");
+ if (!mpath)
+ continue;
+
+ mpath = gtk_tree_path_copy (mpath);
}
else if (GTK_IS_CELL_VIEW (GTK_BIN (i->data)->child))
{
@@ -4172,7 +4177,7 @@ gtk_combo_box_set_active (GtkComboBox *combo_box,
if (index_ != -1)
path = gtk_tree_path_new_from_indices (index_, -1);
-
+
gtk_combo_box_set_active_internal (combo_box, path);
if (path)