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>
This commit is contained in:
parent
e3d1d4e3ca
commit
229601e080
|
@ -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 = glamor_download_sub_pixmap_to_cpu(pixmap, x, y, w, h, sub_pixmap->devKind,
|
||||||
data, pbo, access);
|
data, pbo, access);
|
||||||
|
if(data == NULL) {
|
||||||
|
fbDestroyPixmap(sub_pixmap);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (pbo) {
|
if (pbo) {
|
||||||
assert(sub_pixmap->devPrivate.ptr == NULL);
|
assert(sub_pixmap->devPrivate.ptr == NULL);
|
||||||
sub_pixmap->devPrivate.ptr = data;
|
sub_pixmap->devPrivate.ptr = data;
|
||||||
|
|
Loading…
Reference in New Issue