From 6f7d94580e3b603cb036bef9a1a235ee6b910bc0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 30 Apr 2020 16:49:31 -0400 Subject: pan/decode: Don't crash on missing payload Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/pandecode/decode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index eff8b47aa39..48b179ab69e 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -2288,9 +2288,11 @@ pandecode_bifrost_texture( pandecode_log_cont("\n"); struct pandecode_mapped_memory *tmem = pandecode_find_mapped_gpu_mem_containing(t->payload); - pandecode_texture_payload(t->payload, t->type, t->layout, - true, t->levels, t->depth, - t->array_size, tmem); + if (t->payload) { + pandecode_texture_payload(t->payload, t->type, t->layout, + true, t->levels, t->depth, + t->array_size, tmem); + } pandecode_indent--; pandecode_log("};\n"); -- cgit v1.2.3