gobject: Handle ref_count==0 in notify_by_pspec
authorNick Schermer <nick@xfce.org>
Wed, 7 Aug 2013 19:01:00 +0000 (21:01 +0200)
committerColin Walters <walters@verbum.org>
Wed, 14 Aug 2013 17:11:05 +0000 (18:11 +0100)
commit4b334ef8f1393c997a2d83de4ffe0976dff238c3
tree9ae5ae3cda822e0f736f5943b557e02a7bb0f609
parent62f173f1f3e5da028fd11cb827a54418e1ca8ec2
gobject: Handle ref_count==0 in notify_by_pspec

Just like g_object_notify, check for a zero ref_count in
g_object_notify_by_pspec and leave if it is 0.

This allows using functions in ->finalize() that possibly also
notify a property change on the object.  Previously,
this resulted in an error from g_object_ref.

https://bugzilla.gnome.org/show_bug.cgi?id=705570
gobject/gobject.c
gobject/tests/properties.c