[gnome-desktop] Fix crash in gradient handling code



commit 2de4100ba4e8f2e4de2f9c3487454305f5da9571
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 16 10:22:45 2010 -0400

    Fix crash in gradient handling code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=606456

 libgnome-desktop/gnome-bg.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
index b3a0cf8..5932b8d 100644
--- a/libgnome-desktop/gnome-bg.c
+++ b/libgnome-desktop/gnome-bg.c
@@ -636,6 +636,14 @@ draw_color_area (GnomeBG *bg,
 		 GdkRectangle *rect)
 {
 	guint32 pixel;
+        GdkRectangle extent;
+
+        extent.x = 0;
+        extent.y = 0;
+        extent.width = gdk_pixbuf_get_width (dest);
+        extent.height = gdk_pixbuf_get_height (dest);
+
+        gdk_rectangle_intersect (rect, &extent, rect);
 	
 	switch (bg->color_type) {
 	case GNOME_BG_COLOR_SOLID:



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