aboutsummaryrefslogtreecommitdiff
path: root/backends/plugins/elf/memory-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/plugins/elf/memory-manager.cpp')
-rw-r--r--backends/plugins/elf/memory-manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp
index 5014718ae8..6e54cb8e29 100644
--- a/backends/plugins/elf/memory-manager.cpp
+++ b/backends/plugins/elf/memory-manager.cpp
@@ -78,9 +78,13 @@ void ELFMemoryManager::trackAlloc(uint32 align, uint32 size) {
}
void ELFMemoryManager::allocateHeap() {
+ if (!_heapSize) {
+ warning("ELFMemoryManager: Unable to allocate the heap as its size could not be determined.");
+ return;
+ }
+
// The memory manager should only allocate once
assert (!_heap);
- assert (_heapSize);
// clear the list
_allocList.clear();