From: Alyssa Rosenzweig Date: Tue, 28 Apr 2020 00:35:00 +0000 (-0400) Subject: pan/mdg: Don't crash on unknown branch target X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8d7df6f09acb7220c35323449d512146a7cc06d;p=mesa.git pan/mdg: Don't crash on unknown branch target Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index 14b99d69f49..89b853ce3cb 100644 --- a/src/panfrost/midgard/midgard_print.c +++ b/src/panfrost/midgard/midgard_print.c @@ -298,7 +298,8 @@ mir_print_instruction(midgard_instruction *ins) if (ins->branch.target_type != TARGET_DISCARD) printf(" %s -> block(%d)\n", - branch_target_names[ins->branch.target_type], + ins->branch.target_type < 4 ? + branch_target_names[ins->branch.target_type] : "??", ins->branch.target_block); return;