From: Ian Romanick Date: Fri, 11 Feb 2011 23:19:05 +0000 (-0800) Subject: ir_to_mesa: Don't dereference a NULL pointer during copy propagation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3803295fc2b9c517e80aa46f2338308e23e64e4a;p=mesa.git ir_to_mesa: Don't dereference a NULL pointer during copy propagation The ACP may already be NULL, so don't try to make it NULL again. This should fix bugzilla #34119. --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index d0ec23fc857..7f905ae5ce3 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2754,6 +2754,9 @@ ir_to_mesa_visitor::copy_propagate(void) */ for (int r = 0; r < this->next_temp; r++) { for (int c = 0; c < 4; c++) { + if (!acp[4 * r + c]) + continue; + if (acp[4 * r + c]->src_reg[0].file == PROGRAM_OUTPUT) acp[4 * r + c] = NULL; }