summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2012-08-12 11:02:02 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-08-23 17:34:32 -0400
commit48622a37e0c6ad0c47fa69e83938239d5ad99cab (patch)
tree676749e4316af38c1774ad79583eb200e40b7e83
parent04886fcb67c9a52e879f7df222c95991314c6d0a (diff)
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.
-rw-r--r--src/qxl_driver.c13
1 files 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),