Prevent crash when a python script tries to use pcbnew too early.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15414
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 NBEE Embedded Systems, Miguel Angel Ajo <[email protected]>
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -77,6 +77,13 @@ void ScriptingSetPcbEditFrame( PCB_EDIT_FRAME* aPcbEditFrame )
|
||||
}
|
||||
|
||||
|
||||
void ScriptingOnDestructPcbEditFrame( PCB_EDIT_FRAME* aPcbEditFrame )
|
||||
{
|
||||
if( s_PcbEditFrame == aPcbEditFrame )
|
||||
s_PcbEditFrame = nullptr;
|
||||
}
|
||||
|
||||
|
||||
BOARD* LoadBoard( wxString& aFileName )
|
||||
{
|
||||
if( aFileName.EndsWith( KiCadPcbFileExtension ) )
|
||||
|
||||
Reference in New Issue
Block a user