projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f737a5
)
actor: Make set_flags() safe from unrefs
author
Emmanuele Bassi
<ebassi@linux.intel.com>
Thu, 29 Jul 2010 16:00:24 +0000
(17:00 +0100)
committer
Emmanuele Bassi
<ebassi@linux.intel.com>
Thu, 29 Jul 2010 16:00:24 +0000
(17:00 +0100)
It's possible - though not recommended - that user code causes the
destruction of an actor in one of the notification handlers for
flag-based properties. We should protect the multiple notification
emission with g_object_ref/unref.
clutter/clutter-actor.c
patch
|
blob
|
history
diff --git
a/clutter/clutter-actor.c
b/clutter/clutter-actor.c
index
91adfa9
..
863243e
100644
(file)
--- a/
clutter/clutter-actor.c
+++ b/
clutter/clutter-actor.c
@@
-10368,6
+10368,7
@@
clutter_actor_set_flags (ClutterActor *self,
return;
obj = G_OBJECT (self);
+ g_object_ref (obj);
g_object_freeze_notify (obj);
old_flags = self->flags;
@@
-10397,6
+10398,7
@@
clutter_actor_set_flags (ClutterActor *self,
g_object_notify (obj, "visible");
g_object_thaw_notify (obj);
+ g_object_unref (obj);
}
/**