diff audacious/widgets/playlist_list.c @ 1770:80955c196e11 trunk

[svn] - fix a potential crash when running audacious remotely
author nenolod
date Mon, 02 Oct 2006 18:46:02 -0700
parents a6e6d3500c13
children 630cdcaad7de
line wrap: on
line diff
--- a/audacious/widgets/playlist_list.c	Mon Oct 02 03:35:09 2006 -0700
+++ b/audacious/widgets/playlist_list.c	Mon Oct 02 18:46:02 2006 -0700
@@ -97,8 +97,14 @@
 shade_pixmap(GdkPixmap *in, gint x, gint y, gint x_offset, gint y_offset, gint w, gint h, GdkColor *shade_color)
 {
 	GdkImage *ximg;
-	GdkPixmap *p = gdk_pixmap_new(in, w, h, -1);
-	GdkGC *gc = gdk_gc_new(p);
+	GdkPixmap *p;
+	GdkGC *gc;
+
+	if (in == NULL)
+		return;
+
+	P = gdk_pixmap_new(in, w, h, -1);
+	gc = gdk_gc_new(p);
 
         gdk_draw_pixmap(p, gc, in, x, y, 0, 0, w, h);