diff options
author | Bastien Bouclet | 2020-01-04 17:21:53 +0100 |
---|---|---|
committer | Bastien Bouclet | 2020-01-04 17:49:32 +0100 |
commit | f17a7a96da9f51c5c4735ff34f985516157fcbef (patch) | |
tree | aff5df2f68b56925ad2a95779a80317d1ddf1a91 /backends/plugins/elf/memory-manager.cpp | |
parent | cb2bb8fac7356e5f8231f855a8aa26d32ea9befa (diff) | |
download | scummvm-rg350-f17a7a96da9f51c5c4735ff34f985516157fcbef.tar.gz scummvm-rg350-f17a7a96da9f51c5c4735ff34f985516157fcbef.tar.bz2 scummvm-rg350-f17a7a96da9f51c5c4735ff34f985516157fcbef.zip |
BASE: Fix being unable to run games when using dynamic plugins
When the plugin-engine mapping is not cached in the configuration file,
we were not scanning all the plugins to establish the mapping.
This is a regression from commit: e2d91258b7bfb989dc099f516bb31ceb44554529
This commit reverts the offending commit and implements a proper fix for
the case where there are no dynamic plugins.
Fixes #11300.
Diffstat (limited to 'backends/plugins/elf/memory-manager.cpp')
-rw-r--r-- | backends/plugins/elf/memory-manager.cpp | 6 |
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(); |