Some safe coding. Check that pointer is not null.
This commit is contained in:
parent
543589564d
commit
7e442cf75d
|
@ -148,9 +148,11 @@ void Variables::alias(unsigned int varid1, unsigned int varid2, bool replace)
|
|||
VariableUsage *var1 = find(varid1);
|
||||
VariableUsage *var2 = find(varid2);
|
||||
|
||||
if (!var1 || !var2)
|
||||
return;
|
||||
|
||||
// alias to self
|
||||
if (varid1 == varid2) {
|
||||
if (var1)
|
||||
var1->use(_varReadInScope);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue