mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user