summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2013-09-27 05:25:54 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-09-27 05:25:54 +0800
commit0bf74791b93cd6a96ef0ba95c0e17bcf9aba5834 (patch)
treee1e235b9c495f123a602a52f995cb8bedc9ea73e
parentbad96d415525b12add517b09a26b52c2c36979f7 (diff)
Shoud return null subpixmap if we fail to get a valid map address.
The patch is prepared by Raul Fernandes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86693 Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--src/glamor_pixmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glamor_pixmap.c b/src/glamor_pixmap.c
index 9bbc989..84694ec 100644
--- a/src/glamor_pixmap.c
+++ b/src/glamor_pixmap.c
@@ -1377,6 +1377,10 @@ glamor_get_sub_pixmap(PixmapPtr pixmap, int x, int y, int w, int h, glamor_acces
data = glamor_download_sub_pixmap_to_cpu(pixmap, x, y, w, h, sub_pixmap->devKind,
data, pbo, access);
+ if(data == NULL) {
+ fbDestroyPixmap(sub_pixmap);
+ return NULL;
+ }
if (pbo) {
assert(sub_pixmap->devPrivate.ptr == NULL);
sub_pixmap->devPrivate.ptr = data;