[gtk+] treeview: Always call size request funcs with valid out pointers
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Always call size request funcs with valid out pointers
- Date: Thu, 1 May 2014 13:16:45 +0000 (UTC)
commit b4282e5ef1a53e0e80d8cad24c05c071e6038696
Author: Benjamin Otte <otte redhat com>
Date: Thu May 1 15:16:17 2014 +0200
treeview: Always call size request funcs with valid out pointers
Not doing so causes crashes since
a158a2aa48c8023f99963642cc2657bff207b82NULLd
gtk/gtktreeview.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 9de4db6..891a55c 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -6805,6 +6805,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize)
if (validated_area)
{
GtkRequisition requisition;
+ gint dummy;
/* We temporarily guess a size, under the assumption that it will be the
* same when we get our next size_allocate. If we don't do this, we'll be
@@ -6821,8 +6822,8 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize)
* untill we've recieved an allocation (never update scroll adjustments from size-requests).
*/
prevent_recursion_hack = TRUE;
- gtk_tree_view_get_preferred_width (GTK_WIDGET (tree_view), &requisition.width, NULL);
- gtk_tree_view_get_preferred_height (GTK_WIDGET (tree_view), &requisition.height, NULL);
+ gtk_tree_view_get_preferred_width (GTK_WIDGET (tree_view), &requisition.width, &dummy);
+ gtk_tree_view_get_preferred_height (GTK_WIDGET (tree_view), &requisition.height, &dummy);
prevent_recursion_hack = FALSE;
/* If rows above the current position have changed height, this has
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]