From cb27a5b1120266e4baaa3eb784ff041977ded43f Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 29 Nov 2019 16:37:32 +0100 Subject: 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 --- src/amdgpu_pixmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/amdgpu_pixmap.h') 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 { -- cgit v1.2.3