Fixed segfault in linux when the control chooser dialog of GCPadNew is closed.

Also disabled some code in the same place that caused the application to hang in linux.  This means that if you select keys from the key list you will have to click Set to make it take effect.  At least until I can figure out how to get that working.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5368 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-04-14 20:29:46 +00:00
parent 273ae5920b
commit 803030de7b
1 changed files with 6 additions and 2 deletions

View File

@ -420,12 +420,16 @@ void ControlDialog::SelectControl( wxCommandEvent& event )
final_label += names[ sels[i] ] + wxT('|');
}
control_chooser->textctrl->SetValue( final_label );
#ifdef __linux__
if (!((wxWindow*)this)->IsBeingDeleted())
#endif
control_chooser->textctrl->SetValue( final_label );
#ifndef __linux__ // This causes the application to hang in linux
// kinda dumb
wxCommandEvent nullevent;
((GamepadPage*)m_parent)->SetControl( nullevent );
#endif
}
ControlChooser::ControlChooser( wxWindow* const parent, ControllerInterface::ControlReference* const ref, wxWindow* const eventsink )