Fixes the crash when closing Dolphin

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4752 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2009-12-29 23:15:23 +00:00
parent 9f387f5cf3
commit ec790584aa

View File

@ -955,10 +955,17 @@ void CFrame::UpdateGUI()
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Enable(Paused && Core::GetStartupParameter().bWii);
if (Initialized && Core::GetStartupParameter().bWii)
{
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Check(GetUsbPointer()->AccessWiiMote(0x0100)->IsConnected() == 3);
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->Check(GetUsbPointer()->AccessWiiMote(0x0101)->IsConnected() == 3);
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE3)->Check(GetUsbPointer()->AccessWiiMote(0x0102)->IsConnected() == 3);
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Check(GetUsbPointer()->AccessWiiMote(0x0103)->IsConnected() == 3);
if (GetUsbPointer()->AccessWiiMote(0x0100) != NULL)
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Check(GetUsbPointer()->AccessWiiMote(0x0100)->IsConnected() == 3);
if (GetUsbPointer()->AccessWiiMote(0x0101) != NULL)
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->Check(GetUsbPointer()->AccessWiiMote(0x0101)->IsConnected() == 3);
if (GetUsbPointer()->AccessWiiMote(0x0102) != NULL)
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE3)->Check(GetUsbPointer()->AccessWiiMote(0x0102)->IsConnected() == 3);
if (GetUsbPointer()->AccessWiiMote(0x0103) != NULL)
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Check(GetUsbPointer()->AccessWiiMote(0x0103)->IsConnected() == 3);
}
if (Running)