Check that we have both Rects and Count is > 0 during buffer attach.

NB: When trying to attach a buffer to a surface, there was a corner
case that could fail in that if we just had 'rects' but count was 0,
then the surface would not get damaged (essentially a call to
wl_surface_damage would get passed 0,0 as the size). This fixes that
problem in that if count is <= 0 now, then we'll damage the whole
surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-25 15:45:55 +01:00
parent 3e9edcd539
commit 43e60f3f83
1 changed files with 1 additions and 3 deletions

View File

@ -469,10 +469,8 @@ _evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, u
return;
}
if ((!rects) || (count == 0)) return;
rect = eina_rectangle_new(0, 0, 0, 0);
if (rects)
if ((rects) && (count > 0))
{
unsigned int i = 0;