st-private: Warn if creating shadow for unallocated actors

This commit is contained in:
Marco Trevisan (Treviño) 2018-04-12 21:25:21 -04:00
parent e522e2e804
commit e39d7152f2

View File

@ -432,6 +432,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
CoglPipeline *shadow_pipeline = NULL; CoglPipeline *shadow_pipeline = NULL;
float width, height; float width, height;
g_return_val_if_fail (clutter_actor_has_allocation (actor), NULL);
clutter_actor_get_size (actor, &width, &height); clutter_actor_get_size (actor, &width, &height);
if (width == 0 || height == 0) if (width == 0 || height == 0)