Fixed memory issue when assigning new method options
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-07-27 18:30:05 +02:00
parent ccc6e297f2
commit 82c82ae93d
2 changed files with 8 additions and 7 deletions

View File

@@ -108,9 +108,9 @@ namespace Porygon::Evaluation {
auto value = EvalValuePointer(p);
this->_evaluationScope->CreateVariable(key, value);
} else {
auto var = (GenericFunctionEvalValue*)this -> _evaluationScope ->GetVariable(key).Get();
auto var = (GenericFunctionEvalValue*)this -> _evaluationScope ->GetVariable(key).Take();
var->RegisterOption(option);
//this->_evaluationScope->SetVariable(key, var);
delete var;
}
}