[gtk+] combobox: fix a segfault



commit 7f60cab47d9651ed3ed53b86f1f74de71b55eee0
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu May 1 19:43:20 2014 +0200

    combobox: fix a segfault
    
    Don't dereference a NULL pointer.

 gtk/gtkcombobox.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index c67912f..5571604 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -5602,11 +5602,11 @@ gtk_combo_box_get_preferred_height (GtkWidget *widget,
                                     gint      *minimum_size,
                                     gint      *natural_size)
 {
-  gint min_width;
+  gint min_width, nat_width;
 
   /* Combo box is height-for-width only
    * (so we always just reserve enough height for the minimum width) */
-  GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, &min_width, NULL);
+  GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, &min_width, &nat_width);
   GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width (widget, min_width, minimum_size, 
natural_size);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]