mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
texture: Add some safeguards for paint volumes of empty textures
If the Texture has no material, and the image size is 0x0 then the actor doesn't have any paint volume.
This commit is contained in:
parent
7ffeaef0e9
commit
7e6bf1612b
@ -689,6 +689,16 @@ static gboolean
|
|||||||
clutter_texture_get_paint_volume (ClutterActor *self,
|
clutter_texture_get_paint_volume (ClutterActor *self,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
|
ClutterTexturePrivate *priv;
|
||||||
|
|
||||||
|
priv = CLUTTER_TEXTURE (self)->priv;
|
||||||
|
|
||||||
|
if (priv->material == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (priv->image_width == 0 || priv->image_height == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return _clutter_actor_set_default_paint_volume (self,
|
return _clutter_actor_set_default_paint_volume (self,
|
||||||
CLUTTER_TYPE_TEXTURE,
|
CLUTTER_TYPE_TEXTURE,
|
||||||
volume);
|
volume);
|
||||||
|
Loading…
Reference in New Issue
Block a user