Fix check for zero-sized textures in MutterShaped texture

Patch by Jon Nettleton <jon.nettleton@gmail.com>

http://bugzilla.openedhand.com/show_bug.cgi?id=1538
http://bugzilla.gnome.org/show_bug.cgi?id=590646
This commit is contained in:
Tomas Frydrych 2009-08-03 17:11:15 +01:00
parent 2f63d321d1
commit 245908909b

View File

@ -274,7 +274,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
tex_width = cogl_texture_get_width (paint_tex); tex_width = cogl_texture_get_width (paint_tex);
tex_height = cogl_texture_get_height (paint_tex); tex_height = cogl_texture_get_height (paint_tex);
if (tex_width == 0 || tex_width == 0) /* no contents yet */ if (tex_width == 0 || tex_height == 0) /* no contents yet */
return; return;
if (paint_tex == COGL_INVALID_HANDLE) if (paint_tex == COGL_INVALID_HANDLE)
@ -419,8 +419,8 @@ mutter_shaped_texture_pick (ClutterActor *actor,
tex_width = cogl_texture_get_width (paint_tex); tex_width = cogl_texture_get_width (paint_tex);
tex_height = cogl_texture_get_height (paint_tex); tex_height = cogl_texture_get_height (paint_tex);
if (tex_width == 0 || tex_width == 0) /* no contents yet */ if (tex_width == 0 || tex_height == 0) /* no contents yet */
return; return;
mutter_shaped_texture_ensure_mask (stex); mutter_shaped_texture_ensure_mask (stex);