summaryrefslogtreecommitdiff
path: root/src/amdgpu_pixmap.h
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2019-11-29 16:37:32 +0100
committerMichel Dänzer <michel@daenzer.net>2020-03-18 17:47:15 +0100
commitcb27a5b1120266e4baaa3eb784ff041977ded43f (patch)
treee35397aa75ed1f2234f7303ef1c7ba45c7167253 /src/amdgpu_pixmap.h
parente2cd67abb4aa8b5c942b46dd66dac091b9fad7ad (diff)
Handle NULL fb_ptr in pixmap_get_fb
This can happen when HW acceleration is disabled. Fixes https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/issues/188 (ported from radeon commit 4d84cf438e7f1bebf0053035ef0292e9fed257d1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_pixmap.h')
-rw-r--r--src/amdgpu_pixmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amdgpu_pixmap.h b/src/amdgpu_pixmap.h
index 94ec210..663d414 100644
--- a/src/amdgpu_pixmap.h
+++ b/src/amdgpu_pixmap.h
@@ -162,7 +162,7 @@ amdgpu_pixmap_get_fb(PixmapPtr pix)
handle);
}
- return *fb_ptr;
+ return fb_ptr ? *fb_ptr : NULL;
}
enum {