glamor: don't do copy if we have 0 boxes to copy.

This happens if you run twm + mplayer + xclock and drag
the clock over the mplayer. If we don't catch it, we cause
an illegal draw elements command to be passed to GL.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 1fd82c764d)
This commit is contained in:
Dave Airlie 2016-01-19 02:01:09 +00:00 committed by Adam Jackson
parent 71be56c426
commit 0b95625cec

View File

@ -640,6 +640,9 @@ glamor_copy(DrawablePtr src,
Pixel bitplane,
void *closure)
{
if (nbox == 0)
return;
if (glamor_copy_gl(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure))
return;
glamor_copy_bail(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure);