From: Rob Clark Date: Sat, 30 Aug 2014 20:51:46 +0000 (-0400) Subject: freedreno/ir3: fix potential null ptr deref X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c06afcede2a0cf214aadc7d4ea149b361ee56ad2;p=mesa.git freedreno/ir3: fix potential null ptr deref Fix potential segfault in debug code. Signed-off-by: Rob Clark --- 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));