summaryrefslogtreecommitdiff
path: root/fb/fbpict.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-11-30 13:17:53 +0100
committerKeith Packard <keithp@keithp.com>2009-11-30 08:37:12 -0800
commit66a9616d645f5a23225251d197e00b94c79274f6 (patch)
tree20299381d914ab2890b5c5e4c50c18312b52a738 /fb/fbpict.c
parent8754db77d8169e5ea506a963cebee1a651bcf094 (diff)
fb: Don't crash if copy_drawable() returns NULL.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'fb/fbpict.c')
-rw-r--r--fb/fbpict.c6
1 files 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);