[gtk+] listbox: fix a segfault
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] listbox: fix a segfault
- Date: Thu, 1 May 2014 17:49:00 +0000 (UTC)
commit 24fd96d83784e862c1c7e8eb18bae03bfddd2fab
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu May 1 19:46:47 2014 +0200
listbox: fix a segfault
Don't dereference a NULL pointer.
gtk/gtklistbox.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 6fb9e25..b6d0fe2 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2281,8 +2281,8 @@ gtk_list_box_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height)
{
- gint natural_width;
- gtk_list_box_get_preferred_width (widget, NULL, &natural_width);
+ gint min_width, natural_width;
+ gtk_list_box_get_preferred_width (widget, &min_width, &natural_width);
gtk_list_box_get_preferred_height_for_width (widget, natural_width,
minimum_height, natural_height);
}
@@ -2971,9 +2971,9 @@ gtk_list_box_row_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height)
{
- gint natural_width;
+ gint min_width, natural_width;
- gtk_list_box_row_get_preferred_width (widget, NULL, &natural_width);
+ gtk_list_box_row_get_preferred_width (widget, &min_width, &natural_width);
gtk_list_box_row_get_preferred_height_for_width (widget, natural_width,
minimum_height, natural_height);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]