1999-09-17 Federico Mena Quintero <federico@redhat.com>
+ * src/io-bmp.c (image_load): Set the initial ref_count to 1.
+
+ * src/io-gif.c (image_load): Likewise.
+
+ * src/io-jpeg.c (image_load): Likewise.
+
+ * src/io-png.c (image_load): Likewise.
+
+ * src/io-tiff.c (image_load): Likewise.
+
+ * src/io-xpm.c (_pixbuf_create_from_xpm): Likewise.
+
+ * src/gdk-pixbuf-io.c (gdk_pixbuf_load_image): Added an assertion
+ for the ref_count to be != 0.
+
* src/gdk-pixbuf.c (gdk_pixbuf_ref): Be more paranoid with sanity
checking.
(gdk_pixbuf_unref): Fix incorrect sanity check and comparison.
/* Ok, I'm anal...shoot me */
if (!(pixbuf->art_pixbuf))
return NULL;
- pixbuf->ref_count = 0;
+ pixbuf->ref_count = 1;
pixbuf->unref_func = NULL;
return pixbuf;
/* Ok, I'm anal...shoot me */
if (!(pixbuf->art_pixbuf))
return NULL;
- pixbuf->ref_count = 0;
+ pixbuf->ref_count = 1;
pixbuf->unref_func = NULL;
return pixbuf;