diff options
| author | Anthony <Helios747@users.noreply.github.com> | 2018-04-27 07:18:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-27 07:18:49 +0100 |
| commit | d3db8fc38194757ef504ae8ae438d34c22289715 (patch) | |
| tree | 8d72d3f90ed0abc82b20b70e8314dca796c8b306 /Source/Core/DolphinWX/Debugger/MemoryView.cpp | |
| parent | ddceac16accc380594bcb563fe3acff0952b6ad6 (diff) | |
| parent | e73906ee38e55b374aa426133ddaeae703d34780 (diff) | |
Merge pull request #6700 from sepalani/wx-copy-hex
DolphinWx: Prevent a crash on Copy hex
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/MemoryView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/MemoryView.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Debugger/MemoryView.cpp b/Source/Core/DolphinWX/Debugger/MemoryView.cpp index 7723abb131..17a4104ca3 100644 --- a/Source/Core/DolphinWX/Debugger/MemoryView.cpp +++ b/Source/Core/DolphinWX/Debugger/MemoryView.cpp @@ -22,6 +22,7 @@ #include "Common/CommonTypes.h" #include "Common/DebugInterface.h" #include "Common/StringUtil.h" +#include "Core/Core.h" #include "Core/HW/Memmap.h" #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" @@ -310,7 +311,9 @@ void CMemoryView::OnMouseDownR(wxMouseEvent& event) // menu.Append(IDM_GOTOINMEMVIEW, _("&Goto in mem view")); #if wxUSE_CLIPBOARD menu.Append(IDM_COPYADDRESS, _("Copy &address")); - menu.Append(IDM_COPYHEX, _("Copy &hex")); + menu.Append(IDM_COPYHEX, _("Copy &hex")) + ->Enable(Core::GetState() != Core::State::Uninitialized && + PowerPC::HostIsRAMAddress(selection)); #endif // i18n: This kind of "watch" is used for watching emulated memory. // It's not related to timekeeping devices. |
