Avoid warnings on ClutterClone with a NULL source

clutter_clone_apply_transform should check the source before calling
methods on it, else criticals will be emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2381
This commit is contained in:
Giovanni Campagna 2010-10-24 14:45:16 +02:00 committed by Emmanuele Bassi
parent c7bfe27e96
commit 164af55a6e

View File

@ -133,6 +133,10 @@ clutter_clone_apply_transform (ClutterActor *self, CoglMatrix *matrix)
CLUTTER_ACTOR_CLASS (clutter_clone_parent_class)->apply_transform (self, CLUTTER_ACTOR_CLASS (clutter_clone_parent_class)->apply_transform (self,
matrix); matrix);
/* if we don't have a source, nothing else to do */
if (priv->clone_source == NULL)
return;
/* get our allocated size */ /* get our allocated size */
clutter_actor_get_allocation_geometry (self, &geom); clutter_actor_get_allocation_geometry (self, &geom);