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