Commit 6fce115b authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Arturo Espinosa
Browse files

Be more paranoid with sanity checking. (gdk_pixbuf_unref): Fix incorrect

1999-09-17  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf.c (gdk_pixbuf_ref): Be more paranoid with sanity
	checking.
	(gdk_pixbuf_unref): Fix incorrect sanity check and comparison.
parent 04f5c2a1
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* src/gdk-pixbuf.c (gdk_pixbuf_ref): Be more paranoid with sanity
checking.
(gdk_pixbuf_unref): Fix incorrect sanity check and comparison.
1999-08-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/io-png.c (image_save): Fixed compiler warnings. Fixed write
......
......@@ -28,6 +28,7 @@ void
gdk_pixbuf_ref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (pixbuf->ref_count > 0);
pixbuf->ref_count++;
}
......@@ -36,10 +37,11 @@ void
gdk_pixbuf_unref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (pixbuf->ref_count == 0);
g_return_if_fail (pixbuf->ref_count > 0);
pixbuf->ref_count--;
if (pixbuf->ref_count)
if (pixbuf->ref_count == 0)
gdk_pixbuf_destroy (pixbuf);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment