From 66a9616d645f5a23225251d197e00b94c79274f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 30 Nov 2009 13:17:53 +0100 Subject: [PATCH] fb: Don't crash if copy_drawable() returns NULL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 . Signed-off-by: Michel Dänzer Signed-off-by: Keith Packard --- fb/fbpict.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fb/fbpict.c b/fb/fbpict.c index 2fbef15c3..7ae3ec5fd 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -329,9 +329,11 @@ create_bits_picture (PicturePtr pict, pixman_image_t *image; DrawablePtr drawable; - if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) + if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) { drawable = copy_drawable (pict->pDrawable); - else + if (!drawable) + return NULL; + } else drawable = pict->pDrawable; fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);