add nullptr check to mitigate crashes
wip for reach untracked tags build fixes
This commit is contained in:
parent
f45e9e5e9a
commit
a16acbaf59
|
@ -795,7 +795,10 @@ bool SimplificationPass::CheckScalarConstCmp(hir::Instr* i,
|
||||||
|
|
||||||
if (var_definition) {
|
if (var_definition) {
|
||||||
var_definition = var_definition->GetDestDefSkipAssigns();
|
var_definition = var_definition->GetDestDefSkipAssigns();
|
||||||
def_opcode = var_definition->opcode->num;
|
if (var_definition != NULL)
|
||||||
|
{
|
||||||
|
def_opcode = var_definition->opcode->num;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// x == 0 -> !x
|
// x == 0 -> !x
|
||||||
if (cmpop == OPCODE_COMPARE_EQ && constant_unpacked == 0) {
|
if (cmpop == OPCODE_COMPARE_EQ && constant_unpacked == 0) {
|
||||||
|
|
Loading…
Reference in New Issue