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>
This commit is contained in:
parent
e7308b6c77
commit
1fd82c764d
|
@ -640,6 +640,9 @@ glamor_copy(DrawablePtr src,
|
||||||
Pixel bitplane,
|
Pixel bitplane,
|
||||||
void *closure)
|
void *closure)
|
||||||
{
|
{
|
||||||
|
if (nbox == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (glamor_copy_gl(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure))
|
if (glamor_copy_gl(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure))
|
||||||
return;
|
return;
|
||||||
glamor_copy_bail(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure);
|
glamor_copy_bail(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure);
|
||||||
|
|
Loading…
Reference in New Issue