Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

There is no pixmap associated with source-only pictures.

Fixes Xephyr -fakexa crashing on startup.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Michel Dänzer 2017-03-23 12:42:37 +09:00 committed by Peter Hutterer
parent fdc79fe72b
commit eb2cf11724

View File

@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
if (pSrc != NULL)
ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
if (pMask != NULL)
ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
if (fakexa->pMask != NULL)
ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
if (fakexa->pSrc != NULL)
ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
}