Permalink
Browse files

Qt/debugger: fix some possible crashes and inconsistencies in the bre…

…akpoint 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.
  • Loading branch information...
aldelaro5 committed May 6, 2018
1 parent 09792fd commit 7388774f10da8aaa26c5203fa608aefd04fecf5b
Showing with 11 additions and 2 deletions.
  1. +11 −2 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);

0 comments on commit 7388774

Please sign in to comment.