summaryrefslogtreecommitdiff
path: root/gtk/gtkobject.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-09-23 04:47:45 +0000
committerTim Janik <timj@src.gnome.org>1998-09-23 04:47:45 +0000
commit416b69a2c1b79c9f14cfd3099c88d82c2dc6d876 (patch)
tree04b539c30376a7ba4e17aa870a84dc6f202664b5 /gtk/gtkobject.c
parente1aba58de1251a46bd7e68010953f871b78fd5aa (diff)
downloadgdk-pixbuf-416b69a2c1b79c9f14cfd3099c88d82c2dc6d876.tar.gz
update to Gtk+ version 1.1.3, binary age 1, interface age 1.
Wed Sep 23 06:09:19 1998 Tim Janik <timj@gtk.org> * configure.in: update to Gtk+ version 1.1.3, binary age 1, interface age 1. * gtk/gtkobject.c (gtk_object_ref): (gtk_object_unref): check for ->ref_count to be greater than 0 (the existing code was buggy in letting ->ref_count==0 pass through and then failing the living_objs_ht assertion). * gtk/gtkclist.c (draw_row): fix chopping bug for right justified pixtext fields (Roman Pozlevich <roma@botik.ru>).
Diffstat (limited to 'gtk/gtkobject.c')
-rw-r--r--gtk/gtkobject.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index 6639830a2..af5676172 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -1033,6 +1033,7 @@ gtk_object_ref (GtkObject *object)
{
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
+ g_return_if_fail (object->ref_count > 0);
object->ref_count += 1;
}
@@ -1042,12 +1043,16 @@ gtk_object_unref (GtkObject *object)
{
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
+ g_return_if_fail (object->ref_count > 0);
if (object->ref_count == 1)
- gtk_object_destroy (object);
+ {
+ gtk_object_destroy (object);
- if (object->ref_count > 0)
- object->ref_count -= 1;
+ g_return_if_fail (object->ref_count > 0);
+ }
+
+ object->ref_count -= 1;
if (object->ref_count == 0)
{