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:
parent
71be56c426
commit
0b95625cec
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user