]> Pileus Git - ~andy/gtk/commitdiff
gtk: bail out in render_background_internal() if the extents are <= 0
authorMichael Natterer <mitch@gimp.org>
Sun, 6 Feb 2011 10:13:42 +0000 (11:13 +0100)
committerMichael Natterer <mitch@gimp.org>
Sun, 6 Feb 2011 10:17:59 +0000 (11:17 +0100)
otherwise we run into scaling the cairo_t into a borken state that's
not fixable by cairo_restore().

gtk/gtkthemingengine.c

index 8c090ad12902000237619a181ca7294d231b51cd..da95aeb9ee223db8548ab2539f012c102698525c 100644 (file)
@@ -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);