summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/picture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/render/picture.c b/render/picture.c
index c55dcd84e..dd31f2bb9 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -429,6 +429,9 @@ PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format)
else {
VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid);
+ if (pVisual == NULL)
+ return FALSE;
+
if (CreateColormap(FakeClientID(0), pScreen, pVisual,
&format->index.pColormap, AllocNone, 0)
!= Success)