Add engine fatal error types handling
Add general out-of-memory handling Add safety memory buffer for crash or out of memory handling Refactor Globals exit/error state to be in Engine class
This commit is contained in:
@@ -247,10 +247,6 @@ void NetworkStream::WriteBytes(const void* data, uint32 bytes)
|
||||
while (newLength < position + bytes)
|
||||
newLength *= 2;
|
||||
byte* newBuf = (byte*)Allocator::Allocate(newLength);
|
||||
if (newBuf == nullptr)
|
||||
{
|
||||
OUT_OF_MEMORY;
|
||||
}
|
||||
if (_buffer && _length)
|
||||
Platform::MemoryCopy(newBuf, _buffer, _length);
|
||||
if (_allocated)
|
||||
|
||||
Reference in New Issue
Block a user