diff options
| author | aldelaro5 <aldelaro5@gmail.com> | 2018-05-06 01:55:30 -0400 |
|---|---|---|
| committer | aldelaro5 <aldelaro5@gmail.com> | 2018-05-12 19:06:18 -0400 |
| commit | 7388774f10da8aaa26c5203fa608aefd04fecf5b (patch) | |
| tree | ef989c402080daae0226f5333a7757f31ccbcb6b /Source/Core | |
| parent | 09792fde70d5c0ae0386b2d9dc0b82825bc37de6 (diff) | |
Qt/debugger: fix some possible crashes and inconsistencies in the breakpoint widget
One, which was also possible in Wx is to add an mbp after the core stopped which shouldn't be possible as it needs to add the memcheck on the core thread which wouldn't be running. The other fix is Qt specific where it doesn't clear the breakpoints on stop.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt2/Debugger/BreakpointWidget.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt2/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt2/Debugger/BreakpointWidget.cpp index 1eebcfbff7..7f0e81bfc0 100644 --- a/Source/Core/DolphinQt2/Debugger/BreakpointWidget.cpp +++ b/Source/Core/DolphinQt2/Debugger/BreakpointWidget.cpp @@ -40,8 +40,16 @@ BreakpointWidget::BreakpointWidget(QWidget* parent) : QDockWidget(parent) if (!Settings::Instance().IsDebugModeEnabled()) return; - m_load->setEnabled(Core::IsRunning()); - m_save->setEnabled(Core::IsRunning()); + bool is_initialised = state != Core::State::Uninitialized; + m_new->setEnabled(is_initialised); + m_load->setEnabled(is_initialised); + m_save->setEnabled(is_initialised); + if (!is_initialised) + { + PowerPC::breakpoints.Clear(); + PowerPC::memchecks.Clear(); + Update(); + } }); connect(&Settings::Instance(), &Settings::BreakpointsVisibilityChanged, @@ -101,6 +109,7 @@ void BreakpointWidget::CreateWidgets() m_load = AddAction(m_toolbar, tr("Load"), this, &BreakpointWidget::OnLoad); m_save = AddAction(m_toolbar, tr("Save"), this, &BreakpointWidget::OnSave); + m_new->setEnabled(false); m_load->setEnabled(false); m_save->setEnabled(false); |
