From 586e427b78976ffd0ebd134d08e733215cf6cf90 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 29 Apr 2024 14:07:55 +0200 Subject: [PATCH] pan/decode: Be robust to NULL texture payload Signed-off-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/lib/genxml/decode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/lib/genxml/decode.c b/src/panfrost/lib/genxml/decode.c index fea885a3e54..002a9de1c96 100644 --- a/src/panfrost/lib/genxml/decode.c +++ b/src/panfrost/lib/genxml/decode.c @@ -242,6 +242,9 @@ pandecode_texture_payload(struct pandecode_context *ctx, mali_ptr payload, unsigned nr_samples = tex->dimension == MALI_TEXTURE_DIMENSION_3D ? 1 : tex->sample_count; + if (!payload) + return; + /* A bunch of bitmap pointers follow. * We work out the correct number, * based on the mipmap/cubemap