Don't capture references to local variables for CallAfter.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934
This commit is contained in:
Jeff Young
2024-02-22 23:36:27 +00:00
parent 0ead8a14a1
commit 9d40374baf
14 changed files with 27 additions and 19 deletions
+4 -1
View File
@@ -90,7 +90,10 @@ KIPYTHON_FRAME::KIPYTHON_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT( "KiPython" ),
unityScale )
{
CallAfter( [&](){ SetupPythonEditor(); } );
CallAfter( [this]()
{
SetupPythonEditor();
} );
redirectStdio();
}