mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
From: martin@steghoefer.eu [PATCH 16/16] Fix runtime problem with wxWidgets 3.0: Segmentation fault due to events arriving before initialization.
"The dialogs LadspaEffectDialog, LV2EffectDialog and VampEffectDialog receive EVT_TEXT events before the dialog classes are properly initialized. To prevent this, a workaround was already in place, but was only active on Windows. This happens now on more platforms (including GTK). So activate it on the wxGTK with wx3.0, too."
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/version.h>
|
||||
|
||||
VampEffect::VampEffect(Vamp::HostExt::PluginLoader::PluginKey key,
|
||||
int output,
|
||||
@@ -333,8 +334,8 @@ VampEffectDialog::VampEffectDialog(VampEffect *effect,
|
||||
|
||||
mParameters = plugin->getParameterDescriptors();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// On Windows, for some reason, wxWidgets calls OnTextCtrl during creation
|
||||
#if defined(__WXMSW__) || (defined(__WXGTK__) && wxCHECK_VERSION(3, 0, 0))
|
||||
// In some environments wxWidgets calls OnTextCtrl during creation
|
||||
// of the text control, and VampEffectDialog::OnTextCtrl calls HandleText,
|
||||
// which assumes all the fields have been initialized.
|
||||
// This can give us a bad pointer crash, so manipulate inSlider to
|
||||
|
Reference in New Issue
Block a user