From 48622a37e0c6ad0c47fa69e83938239d5ad99cab Mon Sep 17 00:00:00 2001 From: Søren Sandmann Date: Sun, 12 Aug 2012 11:02:02 -0400 Subject: Reject source pictures in can_accelerate_picture() When a gradient was used as a mask, the driver would crash because there was a mask picture, but not a mask drawable. --- src/qxl_driver.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 3aa7462..a42ef72 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -1324,6 +1324,9 @@ can_accelerate_picture (PicturePtr pict) return FALSE; } + if (!pict->pDrawable) + return FALSE; + if (pict->transform) { if (pict->transform->matrix[2][0] != 0 || @@ -1403,16 +1406,6 @@ qxl_prepare_composite (int op, PixmapPtr pMask, PixmapPtr pDst) { - if (!pSrc) - { - ErrorF ("No src\n"); - return FALSE; - } - if (!pDst) - { - ErrorF ("No dst\n"); - return FALSE; - } return qxl_surface_prepare_composite ( op, pSrcPicture, pMaskPicture, pDstPicture, get_surface (pSrc), -- cgit v1.2.3