From c06afcede2a0cf214aadc7d4ea149b361ee56ad2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 30 Aug 2014 16:51:46 -0400 Subject: freedreno/ir3: fix potential null ptr deref Fix potential segfault in debug code. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/ir3/ir3_dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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)); -- cgit v1.2.3