[gnome-themes-standard] adwaita: Check the pattern isn't NULL before using it



commit 30737523847b0eea94e93592f6502149e5b3f205
Author: Benjamin Otte <otte redhat com>
Date:   Fri Dec 23 17:59:37 2011 +0100

    adwaita: Check the pattern isn't NULL before using it
    
    Otherwise we'll error the cairo context, and that looks really not very
    nice.

 src/adwaita_engine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 43de79b..cd3d5f6 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -293,7 +293,7 @@ render_notebook_extension (GtkThemingEngine *engine,
 
   draw_tab_shape_active (cr, tab_curvature, 0, 0, width, height);
 
-  if (state & GTK_STATE_FLAG_ACTIVE)
+  if (pattern && (state & GTK_STATE_FLAG_ACTIVE))
     {
       cairo_scale (cr, width, height - 6.0);
       cairo_set_source (cr, pattern);



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