pan/decode: Be robust to NULL texture payload

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29382>
This commit is contained in:
Boris Brezillon
2024-04-29 14:07:55 +02:00
committed by Marge Bot
parent 20d25b9f07
commit 586e427b78

View File

@@ -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