Merge pull request #450 from jodavis42/OpCopyMemoryCrash

Null crash fix in OpCopyMemory.
This commit is contained in:
Hans-Kristian Arntzen 2018-02-14 22:05:50 +01:00 committed by GitHub
commit 4d1c5ada03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3244,7 +3244,7 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry)
accessed_variables_to_block[var->self].insert(current_block->self);
// If we store through an access chain, we have a partial write.
if (var->self == lhs)
if (var && var->self == lhs)
complete_write_variables_to_block[var->self].insert(current_block->self);
var = compiler.maybe_get_backing_variable(rhs);