7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Fix null pointer dereference crash when updating board from schematic.

This commit is contained in:
Wayne Stambaugh 2024-10-02 13:39:28 -04:00
parent a871311b6f
commit 38db5e13b0

View File

@ -147,7 +147,6 @@ FOOTPRINT* BOARD_NETLIST_UPDATER::addNewFootprint( COMPONENT* aComponent )
}
FOOTPRINT* footprint = m_frame->LoadFootprint( aComponent->GetFPID() );
footprint->SetComponentClass( m_board->GetComponentClassManager().GetNoneComponentClass() );
if( footprint == nullptr )
{
@ -159,6 +158,8 @@ FOOTPRINT* BOARD_NETLIST_UPDATER::addNewFootprint( COMPONENT* aComponent )
return nullptr;
}
footprint->SetComponentClass( m_board->GetComponentClassManager().GetNoneComponentClass() );
if( m_isDryRun )
{
msg.Printf( _( "Add %s (footprint '%s')." ),