summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-08-27 03:59:05 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-08-27 03:59:05 +0000
commita15842e68e2ebd5dbcdddc1813eaceb98c35de04 (patch)
treef750e50634dd73edc31e6b005101383f55f05b41 /gtk/gtkcombobox.c
parent01bc5631473028f475b05c63100cb99025c36284 (diff)
downloadgdk-pixbuf-a15842e68e2ebd5dbcdddc1813eaceb98c35de04.tar.gz
Don't crash if model is not set. Noted by Mariano Suarez-Alvarez.
Thu Aug 26 23:58:11 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't crash if model is not set. Noted by Mariano Suarez-Alvarez.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 8879a5e72..0636b9488 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3305,6 +3305,9 @@ gtk_combo_box_key_press (GtkWidget *widget,
GtkTreeIter iter;
GtkTreeIter new_iter;
+ if (combo_box->priv->model == NULL)
+ return FALSE;
+
if ((event->keyval == GDK_Down || event->keyval == GDK_KP_Down) &&
state == GDK_MOD1_MASK)
{