mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-07-27 15:41:50 +03:00
Release SquirrelVM::lastError_ after pushing it to the VM stack
This fixes a memory leak.
This commit is contained in:
parent
3301edc54d
commit
c659af5944
@ -1469,6 +1469,7 @@ SQInteger function_stub(HSQUIRRELVM vm)
|
||||
if (!sq_isnull(pSquirrelVM->lastError_))
|
||||
{
|
||||
sq_pushobject(vm, pSquirrelVM->lastError_);
|
||||
sq_release(vm, &pSquirrelVM->lastError_);
|
||||
sq_resetobject(&pSquirrelVM->lastError_);
|
||||
sq_retval = sq_throwobject(vm);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user