Fix a segmentation fault when the wiimote source is changed to a real wiimote in the config dialog.

A little clean up of the debugger code.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7237 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-25 03:56:14 +00:00
parent 18b85b9cd5
commit 1f33fc1a48
6 changed files with 8 additions and 32 deletions

View File

@ -144,7 +144,7 @@ void WiimoteConfigPage::UpdateWiimoteStatus()
// Connect wiimotes
if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index])
CFrame::ConnectWiimote(m_index, true);
else if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index])
else if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index] && WiimoteReal::g_wiimotes[m_index])
CFrame::ConnectWiimote(m_index, WiimoteReal::g_wiimotes[m_index]->IsConnected());
}
}