summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/smi_exa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/smi_exa.c b/src/smi_exa.c
index 70298ed..67a6fdd 100644
--- a/src/smi_exa.c
+++ b/src/smi_exa.c
@@ -623,6 +623,10 @@ SMI_PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, Pi
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
SMIPtr pSmi = SMIPTR(pScrn);
+
+ if (!pSrc) return FALSE;
+ if (!pSrcPicture->pDrawable) return FALSE;
+
int src_pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel >> 3);
int dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel >> 3);