diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-07-21 09:06:06 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-09-03 23:23:11 +0100 |
commit | 4c307beddf2d2f48b2c16209fd7ce7519261d5d5 (patch) | |
tree | a42027715a5f4e16f994279c78a994ac4c10c70e | |
parent | 95e34cd11959d1956fc1b6d1b99a0d545382996c (diff) |
uxa: Check for failed pixmap allocation
Fixes:
Bug 29187 - crash in intel_drv
https://bugs.freedesktop.org/show_bug.cgi?id=29187
Backtrace:
0: /usr/bin/X (xorg_backtrace+0x28) [0x466808]
1: /usr/bin/X (0x400000+0x67c79) [0x467c79]
2: /lib/libpthread.so.0 (0x7ff19b297000+0xef60) [0x7ff19b2a5f60]
3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7ff197986000+0x34684) => uxa/uxa-render.c:841
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit c57840b272ba88fddf22484929608431879b0fab)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r-- | uxa/uxa-render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 056b60a4..0c61146c 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -794,8 +794,10 @@ uxa_acquire_drawable(ScreenPtr pScreen, PictureMatchFormat(pScreen, depth, pSrc->format), 0, 0, serverClient, &error); pScreen->DestroyPixmap(pPixmap); - ValidatePicture(pDst); + if (!pDst) + return 0; + ValidatePicture(pDst); done: pDst->componentAlpha = pSrc->componentAlpha; *out_x = 0; |