[gtk+] GtkFlowBox: fixed NULL dereferencing segfaults
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFlowBox: fixed NULL dereferencing segfaults
- Date: Thu, 1 May 2014 23:36:43 +0000 (UTC)
commit 35df3bc182e0839cf3afda85d1064e1c1c69c2a8
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Thu May 1 20:31:59 2014 -0300
GtkFlowBox: fixed NULL dereferencing segfaults
gtk/gtkflowbox.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 9a03ec3..e2cbc37 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -2093,9 +2093,9 @@ gtk_flow_box_get_preferred_width (GtkWidget *widget,
else /* GTK_ORIENTATION_VERTICAL */
{
/* Return the width for the minimum height */
- gint min_height;
+ gint min_height, nat_height;
- GTK_WIDGET_GET_CLASS (widget)->get_preferred_height (widget, &min_height, NULL);
+ GTK_WIDGET_GET_CLASS (widget)->get_preferred_height (widget, &min_height, &nat_height);
GTK_WIDGET_GET_CLASS (widget)->get_preferred_width_for_height (widget,
min_height,
&min_width,
@@ -2127,9 +2127,9 @@ gtk_flow_box_get_preferred_height (GtkWidget *widget,
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
/* Return the height for the minimum width */
- gint min_width;
+ gint min_width, nat_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,
&min_height,
@@ -2218,7 +2218,7 @@ gtk_flow_box_get_preferred_height_for_width (GtkWidget *widget,
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
- gint min_width;
+ gint min_width, nat_width;
gint line_length;
gint item_size, extra_pixels;
@@ -2227,7 +2227,7 @@ gtk_flow_box_get_preferred_height_for_width (GtkWidget *widget,
goto out;
/* Make sure its no smaller than the minimum */
- 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);
avail_size = MAX (width, min_width);
if (avail_size <= 0)
@@ -2384,7 +2384,7 @@ gtk_flow_box_get_preferred_width_for_height (GtkWidget *widget,
}
else /* GTK_ORIENTATION_VERTICAL */
{
- gint min_height;
+ gint min_height, nat_height;
gint line_length;
gint item_size, extra_pixels;
@@ -2393,7 +2393,7 @@ gtk_flow_box_get_preferred_width_for_height (GtkWidget *widget,
goto out;
/* Make sure its no smaller than the minimum */
- GTK_WIDGET_GET_CLASS (widget)->get_preferred_height (widget, &min_height, NULL);
+ GTK_WIDGET_GET_CLASS (widget)->get_preferred_height (widget, &min_height, &nat_height);
avail_size = MAX (height, min_height);
if (avail_size <= 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]