ClutterClone: Handle clone_source == NULL for get_paint_volume()

It's valid to have a ClutterClone without a clone source; in this
case the paint volume is empty.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2360
This commit is contained in:
Owen W. Taylor 2010-10-07 16:00:47 -04:00 committed by Emmanuele Bassi
parent e005892534
commit 8089af3c1b

View File

@ -195,6 +195,10 @@ clutter_clone_get_paint_volume (ClutterActor *self,
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv; ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
const ClutterPaintVolume *source_volume; const ClutterPaintVolume *source_volume;
/* if the source is not set the paint volume is defined to be empty */
if (priv->clone_source == NULL)
return TRUE;
/* query the volume of the source actor and simply masquarade it as /* query the volume of the source actor and simply masquarade it as
* the clones volume... */ * the clones volume... */
source_volume = clutter_actor_get_paint_volume (priv->clone_source); source_volume = clutter_actor_get_paint_volume (priv->clone_source);