Give wxTheApp to python scripts that end up touching Pgm().App()
Fixes KICAD-QG
This commit is contained in:
parent
3a567a3ae1
commit
672265b564
|
@ -174,7 +174,13 @@ void PGM_BASE::Destroy()
|
|||
|
||||
wxApp& PGM_BASE::App()
|
||||
{
|
||||
wxASSERT( wxTheApp );
|
||||
if( wxTheApp == nullptr )
|
||||
{
|
||||
// This should only happen with python scripts
|
||||
wxApp dummy;
|
||||
return dummy;
|
||||
}
|
||||
|
||||
return *wxTheApp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue