summaryrefslogtreecommitdiff
path: root/src/mesa/program
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-02-11 15:19:05 -0800
committerIan Romanick <ian.d.romanick@intel.com>2011-02-11 15:44:19 -0800
commit3803295fc2b9c517e80aa46f2338308e23e64e4a (patch)
treef83919df3894cd4549d7d7f49eb199a6d07d525b /src/mesa/program
parenta0120e6e0f4fbf11a43725862a03f8dc6904bc4b (diff)
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.
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index d0ec23fc85..7f905ae5ce 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;
}