From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / glx / xpm-ximage.c
index ac17b987c25177757b0cb4bd8641681b359cb83c..cf600bc7312ed9b618d8f079c01eaef761dba26d 100644 (file)
@@ -1,5 +1,5 @@
 /* xpm-ximage.c --- converts XPM data to an XImage for use with OpenGL.
- * xscreensaver, Copyright (c) 1998-2006 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1998-2013 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -157,7 +157,9 @@ xpm_to_ximage_1 (Display *dpy, Visual *visual, Colormap cmap,
             }
           row += stride;
         }
-      gdk_pixbuf_unref (pb); /* #### does doing this free colors? */
+
+      /* #### are colors getting freed here? */
+      g_object_unref (pb);
 
       return image;
     }
@@ -224,7 +226,7 @@ xpm_to_ximage_1 (Display *dpy, Visual *visual, Colormap cmap,
   if (filename)
     {
       xpm_data = 0;
-      if (! XpmReadFileToData ((char *) filename, &xpm_data))
+      if (XpmSuccess != XpmReadFileToData ((char *) filename, &xpm_data))
         {
           fprintf (stderr, "%s: unable to read XPM file %s\n",
                    progname, filename);