From: Michel Dänzer <michel.daenzer@xxxxxxx> Fixes crash in that case. Bugzilla: https://bugs.freedesktop.org/106293 (Ported from radeon commit 65c9dfea4e841b7d6f795c7489fede58c5e9631f) Signed-off-by: Michel Dänzer <michel.daenzer at amd.com> --- src/amdgpu_glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c index 44cdbcff7..8b839105e 100644 --- a/src/amdgpu_glamor.c +++ b/src/amdgpu_glamor.c @@ -185,6 +185,9 @@ amdgpu_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, struct amdgpu_pixmap *priv; PixmapPtr pixmap, new_pixmap = NULL; + if (!xf86GetPixFormat(scrn, depth)) + return NULL; + if (!AMDGPU_CREATE_PIXMAP_SHARED(usage)) { if (info->shadow_primary) { if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) -- 2.18.0