summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2014-02-07 14:44:02 +0200
committerBrian Paul <brianp@vmware.com>2014-02-07 08:14:05 -0700
commitd3e948340be3fe61d3724f1b96651c2097b4026e (patch)
tree84ad8e65f12e9b912b4134a7003c98b14da315e7 /src
parente503609e6feb9373ec3bba4ff028a66f1517be30 (diff)
downloadexternal_mesa3d-d3e948340be3fe61d3724f1b96651c2097b4026e.zip
external_mesa3d-d3e948340be3fe61d3724f1b96651c2097b4026e.tar.gz
external_mesa3d-d3e948340be3fe61d3724f1b96651c2097b4026e.tar.bz2
i965: Add missing null check in fs_visitor::dead_code_eliminate_local()
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c290c28..217892a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2190,6 +2190,10 @@ fs_visitor::dead_code_eliminate_local()
ht = _mesa_hash_table_create(mem_ctx, dead_code_hash_compare);
+ if (ht == NULL) {
+ return false;
+ }
+
foreach_list_safe(node, &this->instructions) {
fs_inst *inst = (fs_inst *)node;