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>
This commit is contained in:
parent
8a26a4aff5
commit
211d4c2d35
|
@ -862,7 +862,11 @@ createSourcePicture(void)
|
||||||
{
|
{
|
||||||
PicturePtr pPicture;
|
PicturePtr pPicture;
|
||||||
|
|
||||||
pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec, PRIVATE_PICTURE);
|
pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec,
|
||||||
|
PRIVATE_PICTURE);
|
||||||
|
if (!pPicture)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pPicture->pDrawable = 0;
|
pPicture->pDrawable = 0;
|
||||||
pPicture->pFormat = 0;
|
pPicture->pFormat = 0;
|
||||||
pPicture->pNext = 0;
|
pPicture->pNext = 0;
|
||||||
|
|
Loading…
Reference in New Issue