summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/picture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/picture.c b/render/picture.c
index 3d52dec01..6d9c9df3a 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -862,7 +862,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;