diff options
Diffstat (limited to 'engines/lure/memory.cpp')
-rw-r--r-- | engines/lure/memory.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/lure/memory.cpp b/engines/lure/memory.cpp index c5c28fa8bc..137a8f6bee 100644 --- a/engines/lure/memory.cpp +++ b/engines/lure/memory.cpp @@ -93,8 +93,12 @@ void MemoryBlock::copyFrom(const byte *src, uint32 srcPos, uint32 destPos, uint3 void MemoryBlock::reallocate(uint32 size1) { _size = size1; - _data = (byte *) realloc(_data, size1); - if (!_data) error ("Failed reallocating memory block"); + + byte *tmp = (byte *) realloc(_data, size1); + if (!tmp) + error ("[MemoryBlock::reallocate] Failed reallocating memory block"); + + _data = tmp; } } // End of namespace Lure |