Return nullptr straight away

pull/3236/head
Evil Eye 4 months ago
parent 4652151630
commit aa808d63bc

@ -111,8 +111,7 @@ namespace LuaUtil
if (!newPtr) if (!newPtr)
{ {
Log(Debug::Error) << "Lua realloc " << osize << "->" << nsize << " failed"; Log(Debug::Error) << "Lua realloc " << osize << "->" << nsize << " failed";
smallAllocDelta = 0; return nullptr;
bigAllocDelta = 0;
} }
} }
self->mTotalMemoryUsage += smallAllocDelta + bigAllocDelta; self->mTotalMemoryUsage += smallAllocDelta + bigAllocDelta;

Loading…
Cancel
Save