mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 18:03:45 +00:00
FP editor: fix possible crash when saving a footprint due to a null pointer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19018
This commit is contained in:
parent
277b963fac
commit
89e281d042
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 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
|
||||
@ -200,7 +200,8 @@ wxString PCB_TEXT::GetShownText( bool aAllowExtraText, int aDepth ) const
|
||||
return true;
|
||||
}
|
||||
|
||||
if( board->ResolveTextVar( token, aDepth + 1 ) )
|
||||
// board can be null in some cases when saving a footprint in FP editor
|
||||
if( board && board->ResolveTextVar( token, aDepth + 1 ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user