mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
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…
x
Reference in New Issue
Block a user