From b3cdfe0c19f033ebcde9b8cfac86cda669737a8a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 30 Mar 2005 17:10:47 +0000 Subject: [PATCH] Don't segfault if somebody tries to popup an unrealized combo box. 2005-03-30 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_popup): Don't segfault if somebody tries to popup an unrealized combo box. (#172031, Felipe Heidrich) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkcombobox.c | 3 +++ 4 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9aa87e8ead..12bffbe378 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-30 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_popup): Don't + segfault if somebody tries to popup an unrealized + combo box. (#172031, Felipe Heidrich) + 2005-03-30 Tor Lillqvist * gdk/win32/gdkevents-win32.c (build_pointer_event_state): The diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9aa87e8ead..12bffbe378 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-03-30 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_popup): Don't + segfault if somebody tries to popup an unrealized + combo box. (#172031, Felipe Heidrich) + 2005-03-30 Tor Lillqvist * gdk/win32/gdkevents-win32.c (build_pointer_event_state): The diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9aa87e8ead..12bffbe378 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-03-30 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_popup): Don't + segfault if somebody tries to popup an unrealized + combo box. (#172031, Felipe Heidrich) + 2005-03-30 Tor Lillqvist * gdk/win32/gdkevents-win32.c (build_pointer_event_state): The diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index c9f8967fa6..d1e83bb68c 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1589,6 +1589,9 @@ gtk_combo_box_popup (GtkComboBox *combo_box) g_return_if_fail (GTK_IS_COMBO_BOX (combo_box)); + if (!GTK_WIDGET_REALIZED (combo_box)) + return; + if (GTK_WIDGET_MAPPED (combo_box->priv->popup_widget)) return;