Call Host_NotifyMapLoaded when clearing g_symbolDB

Otherwise DolphinQt will have a stale symbol list and
you can get nullptr dereferences when trying to use it.
This commit is contained in:
JosJuice 2019-05-01 17:32:45 +02:00
commit 8fd6f8f6e9
5 changed files with 24 additions and 3 deletions

View file

@ -35,6 +35,7 @@
#include "Core/HLE/HLE.h"
#include "Core/HW/DVD/DVDInterface.h"
#include "Core/HW/SI/SI.h"
#include "Core/Host.h"
#include "Core/IOS/ES/ES.h"
#include "Core/IOS/ES/Formats.h"
#include "Core/PatchEngine.h"
@ -724,7 +725,11 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri
if (Core::IsRunning())
{
// TODO: have a callback mechanism for title changes?
g_symbolDB.Clear();
if (!g_symbolDB.IsEmpty())
{
g_symbolDB.Clear();
Host_NotifyMapLoaded();
}
CBoot::LoadMapFromFilename();
HLE::Reload();
PatchEngine::Reload();