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>
This commit is contained in:
Michel Dänzer
2019-11-29 16:37:32 +01:00
committed by Michel Dänzer
parent e2cd67abb4
commit cb27a5b112

View File

@@ -162,7 +162,7 @@ amdgpu_pixmap_get_fb(PixmapPtr pix)
handle);
}
return *fb_ptr;
return fb_ptr ? *fb_ptr : NULL;
}
enum {