assert ref_count>0.

Wed Jan 27 09:19:07 1999  Tim Janik  <timj@gtk.org>

        * gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
This commit is contained in:
Tim Janik 1999-01-27 08:53:36 +00:00 • committed by Tim Janik
commit 90c7ea0b91
9 changed files with 34 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -1,3 +1,7 @@
Wed Jan 27 09:19:07 1999 Tim Janik <timj@gtk.org>
* gdk/gdkcolor.c (gdk_colormap_unref): assert ref_count>0.
Mon Jan 25 20:05:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}):

View file

@ -162,6 +162,7 @@ GdkColormap*
gdk_colormap_ref (GdkColormap *cmap)
{
GdkColormapPrivate *private = (GdkColormapPrivate *)cmap;
g_return_val_if_fail (cmap != NULL, NULL);
private->ref_count += 1;
@ -172,7 +173,9 @@ void
gdk_colormap_unref (GdkColormap *cmap)
{
GdkColormapPrivate *private = (GdkColormapPrivate *)cmap;
g_return_if_fail (cmap != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1;
if (private->ref_count == 0)

View file

@ -162,6 +162,7 @@ GdkColormap*
gdk_colormap_ref (GdkColormap *cmap)
{
GdkColormapPrivate *private = (GdkColormapPrivate *)cmap;
g_return_val_if_fail (cmap != NULL, NULL);
private->ref_count += 1;
@ -172,7 +173,9 @@ void
gdk_colormap_unref (GdkColormap *cmap)
{
GdkColormapPrivate *private = (GdkColormapPrivate *)cmap;
g_return_if_fail (cmap != NULL);
g_return_if_fail (private->ref_count > 0);
private->ref_count -= 1;
if (private->ref_count == 0)