diff options
-rw-r--r-- | src/panfrost/midgard/compiler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index f2fc5d36146..518de4c7df4 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -390,7 +390,7 @@ mir_next_op(struct midgard_instruction *ins) mir_foreach_bundle_in_block_rev(block, _bundle) \ for (i = (_bundle->instruction_count - 1), v = _bundle->instructions[i]; \ i >= 0; \ - --i, v = _bundle->instructions[i]) \ + --i, v = (i >= 0) ? _bundle->instructions[i] : NULL) \ #define mir_foreach_instr_global(ctx, v) \ mir_foreach_block(ctx, v_block) \ |