projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ffeaef
)
texture: Add some safeguards for paint volumes of empty textures
author
Emmanuele Bassi
<ebassi@linux.intel.com>
Fri, 1 Apr 2011 10:42:41 +0000
(11:42 +0100)
committer
Emmanuele Bassi
<ebassi@linux.intel.com>
Fri, 1 Apr 2011 10:42:41 +0000
(11:42 +0100)
If the Texture has no material, and the image size is 0x0 then the actor
doesn't have any paint volume.
clutter/clutter-texture.c
patch
|
blob
|
history
diff --git
a/clutter/clutter-texture.c
b/clutter/clutter-texture.c
index
38af6f7
..
ae4aa13
100644
(file)
--- a/
clutter/clutter-texture.c
+++ b/
clutter/clutter-texture.c
@@
-689,6
+689,16
@@
static gboolean
clutter_texture_get_paint_volume (ClutterActor *self,
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,
CLUTTER_TYPE_TEXTURE,
volume);