[Xfce4-commits] <ristretto:master> Fix bug #8135 (Segmentation fault)

Stephan Arts noreply at xfce.org
Fri Nov 11 18:58:01 CET 2011


Updating branch refs/heads/master
         to 8055fc9f3aee18f7f12d175684977b07dd4160bf (commit)
       from 6553fb5c38e97d3904a0ea84559fbd0ba95926bf (commit)

commit 8055fc9f3aee18f7f12d175684977b07dd4160bf
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Nov 11 18:42:39 2011 +0100

    Fix bug #8135 (Segmentation fault)
    
    Segmentation fault when paint_background_icon tries to use a NULL bg_icon

 src/image_viewer.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/image_viewer.c b/src/image_viewer.c
index 2b47608..30a7ab3 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -798,12 +798,15 @@ paint_background_icon (
 
     /* Draw the pixbuf on the cairo-context */
     /****************************************/
-    gdk_cairo_set_source_pixbuf (
-            ctx,
-            viewer->priv->bg_icon,
-            0.0,
-            0.0);
-    cairo_paint_with_alpha (ctx, 0.1);
+    if(viewer->priv->bg_icon != NULL)
+    {
+        gdk_cairo_set_source_pixbuf (
+                ctx,
+                viewer->priv->bg_icon,
+                0.0,
+                0.0);
+        cairo_paint_with_alpha (ctx, 0.1);
+    }
 }
 
 static void


More information about the Xfce4-commits mailing list