From 803030de7b4ef3320cc96c8ee98ebd4012c0d182 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/trunk@5368 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp b/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp index 6f99574bc2..c6ca3e920c 100644 --- a/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp +++ b/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp @@ -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 )