render: Propagate allocation failure from createSourcePicture()

All the callers were already checking for failure, except that
createSourcePicture() itself was failing to check whether it
successfully allocated the Picture.

[ajax: Rebase, fix line wrap of preceding line]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 211d4c2d35)
This commit is contained in:
Chris Wilson 2011-12-14 15:55:22 +00:00 committed by Adam Jackson
parent 025ae119a7
commit 0c5ef339ae
1 changed files with 5 additions and 1 deletions

View File

@ -856,7 +856,11 @@ createSourcePicture(void)
{
PicturePtr pPicture;
pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec, PRIVATE_PICTURE);
pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec,
PRIVATE_PICTURE);
if (!pPicture)
return 0;
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;