From 8089af3c1b0e9d9501ee5fad4249a3af1bfdb5dc Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 7 Oct 2010 16:00:47 -0400 Subject: [PATCH] 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 --- clutter/clutter-clone.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clutter/clutter-clone.c b/clutter/clutter-clone.c index 9ebc3c3eb..6db6c0c5b 100644 --- a/clutter/clutter-clone.c +++ b/clutter/clutter-clone.c @@ -195,6 +195,10 @@ clutter_clone_get_paint_volume (ClutterActor *self, ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv; 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 * the clones volume... */ source_volume = clutter_actor_get_paint_volume (priv->clone_source);