summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-08-30 16:51:46 -0400
committerRob Clark <[email protected]>2014-08-30 18:02:51 -0400
commitc06afcede2a0cf214aadc7d4ea149b361ee56ad2 (patch)
tree130a6d283daaa0c26a9b4e9f53a98bf626f10e07
parentc99f09f4be29f3f7560607edf001497e1b5abfbf (diff)
freedreno/ir3: fix potential null ptr deref
Fix potential segfault in debug code. Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_dump.c b/src/gallium/drivers/freedreno/ir3/ir3_dump.c
index 1a6f49d51cd..61336284412 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_dump.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_dump.c
@@ -322,7 +322,8 @@ static void ir3_block_dump(struct ir3_dump_ctx *ctx,
/* draw instruction graph: */
for (i = 0; i < block->noutputs; i++)
- dump_instr(ctx, block->outputs[i]);
+ if (block->outputs[i])
+ dump_instr(ctx, block->outputs[i]);
/* draw outputs: */
fprintf(ctx->f, "output%lx [shape=record,label=\"outputs", PTRID(block));