Browse Source

Fix Coverity warnings

6.0.7
jean-pierre charras 4 years ago
parent
commit
0533196294
  1. 2
      pcbnew/footprint_libraries_utils.cpp
  2. 1
      pcbnew/tools/board_editor_control.cpp

2
pcbnew/footprint_libraries_utils.cpp

@ -867,7 +867,6 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew )
// update footprint in the current board,
// not just add it to the board with total disregard for the netlist...
PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
TOOL_MANAGER* toolMgr = pcbframe->GetToolManager();
if( pcbframe == nullptr ) // happens when the board editor is not active (or closed)
{
@ -875,6 +874,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew )
return false;
}
TOOL_MANAGER* toolMgr = pcbframe->GetToolManager();
BOARD* mainpcb = pcbframe->GetBoard();
FOOTPRINT* sourceFootprint = nullptr;
FOOTPRINT* editorFootprint = GetBoard()->GetFirstFootprint();

1
pcbnew/tools/board_editor_control.cpp

@ -177,6 +177,7 @@ BOARD_EDITOR_CONTROL::BOARD_EDITOR_CONTROL() :
PCB_TOOL_BASE( "pcbnew.EditorControl" ),
m_frame( nullptr ),
m_inPlaceFootprint( false ),
m_placingFootprint( false ),
m_inPlaceTarget( false )
{
m_placeOrigin = std::make_unique<KIGFX::ORIGIN_VIEWITEM>( KIGFX::COLOR4D( 0.8, 0.0, 0.0, 1.0 ),

Loading…
Cancel
Save