[gtk+] gtk: bail out in render_background_internal() if the extents are <= 0



commit f23585b7bb96d3da3844337aa8a99609ddbb89d4
Author: Michael Natterer <mitch gimp org>
Date:   Sun Feb 6 11:13:42 2011 +0100

    gtk: bail out in render_background_internal() if the extents are <= 0
    
    otherwise we run into scaling the cairo_t into a borken state that's
    not fixable by cairo_restore().

 gtk/gtkthemingengine.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 8c090ad..da95aeb 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1490,6 +1490,9 @@ render_background_internal (GtkThemingEngine *engine,
   gint radius, border_width;
   GtkBorderStyle border_style;
 
+  if (width <= 0 || height <= 0)
+    return;
+
   flags = gtk_theming_engine_get_state (engine);
   cairo_save (cr);
 



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