diff options
author | Strangerke | 2011-06-29 16:15:41 +0200 |
---|---|---|
committer | Strangerke | 2011-06-29 16:15:41 +0200 |
commit | b0c9c9122fc678074aba30068e5b36d347208e65 (patch) | |
tree | 79a99db08ec985f2e5f1e216823b1104d5b753fb /engines/lure/memory.cpp | |
parent | f2f3124246a77036f843dee2d83ad28084234ebc (diff) | |
parent | c32a3ea0d30336771bab460ecccb58c4614e6294 (diff) | |
download | scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.gz scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.tar.bz2 scummvm-rg350-b0c9c9122fc678074aba30068e5b36d347208e65.zip |
Merge branch 'master' of github.com:scummvm/scummvm into soltys_wip2
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 |