summaryrefslogtreecommitdiff
path: root/clutter/clutter-actor.c
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2015-09-29 14:15:16 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2015-09-29 14:15:16 -0400
commit76c8cd292ed269bd75e7482d96fd4209076d2266 (patch)
tree07cb334c1aeada956e21feccd04c3ed1cd07e895 /clutter/clutter-actor.c
parent86a65ddffc511418e1aff48c4b8b9b7f7caa75f3 (diff)
downloadclutter-76c8cd292ed269bd75e7482d96fd4209076d2266.tar.gz
Avoid crashing when an actor not parented to a toplevel is cloned
If we can't realize the source actor for a clone, simply skip updating the map state and painting it. https://bugzilla.gnome.org/show_bug.cgi?id=745517
Diffstat (limited to 'clutter/clutter-actor.c')
-rw-r--r--clutter/clutter-actor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index ad106c452..53c1354f0 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -15938,7 +15938,11 @@ _clutter_actor_set_enable_paint_unmapped (ClutterActor *self,
*/
clutter_actor_realize (self);
- clutter_actor_update_map_state (self, MAP_STATE_MAKE_MAPPED);
+ /* If the actor isn't ultimately connected to a toplevel, it can't be
+ * realized or painted.
+ */
+ if (CLUTTER_ACTOR_IS_REALIZED (self))
+ clutter_actor_update_map_state (self, MAP_STATE_MAKE_MAPPED);
}
else
{