summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DebuggerWX/Src/MemoryWindow.cpp')
-rw-r--r--Source/Core/DebuggerWX/Src/MemoryWindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
index e7a02ca518..2ae39b249e 100644
--- a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp
@@ -109,10 +109,14 @@ CMemoryWindow::~CMemoryWindow()
void CMemoryWindow::Save(IniFile& _IniFile) const
{
- _IniFile.Set("MemoryWindow", "x", GetPosition().x);
- _IniFile.Set("MemoryWindow", "y", GetPosition().y);
- _IniFile.Set("MemoryWindow", "w", GetSize().GetWidth());
- _IniFile.Set("MemoryWindow", "h", GetSize().GetHeight());
+ // Prevent these bad values that can happen after a crash or hanging
+ if(GetPosition().x != -32000 && GetPosition().y != -32000)
+ {
+ _IniFile.Set("MemoryWindow", "x", GetPosition().x);
+ _IniFile.Set("MemoryWindow", "y", GetPosition().y);
+ _IniFile.Set("MemoryWindow", "w", GetSize().GetWidth());
+ _IniFile.Set("MemoryWindow", "h", GetSize().GetHeight());
+ }
}