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:
parent
025ae119a7
commit
0c5ef339ae
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue