From 3f39e38372cbc4169c9d03dd15d3608b6dcd83b7 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sun, 28 Jun 2015 17:50:29 +0200 Subject: [PATCH] CheatSearchTab: Check Core state instead of checking a memory pointer. --- Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp b/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp index d559e9dacd..d73c11a7c3 100644 --- a/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp +++ b/Source/Core/DolphinWX/Cheats/CheatSearchTab.cpp @@ -17,6 +17,7 @@ #include "Common/CommonTypes.h" #include "Common/StringUtil.h" #include "Core/ActionReplay.h" +#include "Core/Core.h" #include "Core/HW/Memmap.h" #include "DolphinWX/WxUtils.h" #include "DolphinWX/Cheats/CheatSearchTab.h" @@ -125,7 +126,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent) void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED(event)) { const u8* const memptr = Memory::m_pRAM; - if (memptr == nullptr) + if (!Core::IsRunningAndStarted()) { WxUtils::ShowErrorDialog(_("A game is not currently running.")); return; @@ -157,7 +158,7 @@ void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED(event)) void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&) { const u8* const memptr = Memory::m_pRAM; - if (memptr == nullptr) + if (!Core::IsRunningAndStarted()) { WxUtils::ShowErrorDialog(_("A game is not currently running.")); return;