[gtk+/gtk-3-14] stylecontext: fix icon-source extents computation



commit 5930c55d42c90b0e7d62649aabf155898c55be89
Author: Benjamin Otte <otte redhat com>
Date:   Tue Oct 21 05:47:15 2014 +0200

    stylecontext: fix icon-source extents computation
    
    for the builtin image or invalid matrix case. We used to return invalid
    memory in those cases. And that was not good.

 gtk/gtkstylecontext.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 3b924c6..b928b22 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -4577,10 +4577,10 @@ _gtk_style_context_get_icon_extents (GtkStyleContext *context,
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (extents != NULL);
 
-  rect.x = x;
-  rect.y = y;
-  rect.width = width;
-  rect.height = height;
+  extents->x = x;
+  extents->y = y;
+  extents->width = width;
+  extents->height = height;
 
   /* strictly speaking we should return an empty rect here,
    * but most code still draws a fallback  in this case */


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