From 909f36017be7715f67356e5065c26c9dabff7e0f Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Wed, 14 Apr 2010 20:29:46 +0000 Subject: [PATCH] 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/branches/stable@5368 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_GCPadNew/Src/ConfigDiag.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_GCPadNew/Src/ConfigDiag.cpp b/Source/Plugins/Plugin_GCPadNew/Src/ConfigDiag.cpp index cd68081381..cdbce1a806 100644 --- a/Source/Plugins/Plugin_GCPadNew/Src/ConfigDiag.cpp +++ b/Source/Plugins/Plugin_GCPadNew/Src/ConfigDiag.cpp @@ -369,11 +369,16 @@ void ControlDialog::SelectControl( wxCommandEvent& event ) if (!final_label.CompareTo(wxT("|"))) final_label.Empty(); - control_chooser->textctrl->SetLabel( final_label ); +#ifdef __linux__ + if (!((wxWindow*)this)->IsBeingDeleted()) +#endif + control_chooser->textctrl->SetLabel( final_label ); +#ifndef __linux__ // This causes the application to hang in linux // kinda dumb wxCommandEvent nullevent; ((GamepadPage*)m_parent)->SetControl( nullevent ); +#endif }