Handling Coverity reports.
This commit is contained in:
parent
a0b5d1cd7b
commit
5caa1523bd
|
@ -530,6 +530,12 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc
|
|||
PNS_JOINT* jt = m_currentNode->FindJoint( p0, aVia );
|
||||
VECTOR2I p0_pushed( p0 + aForce );
|
||||
|
||||
if( !jt )
|
||||
{
|
||||
TRACEn( 1, "weird, can't find the center-of-via joint\n" );
|
||||
return SH_INCOMPLETE;
|
||||
}
|
||||
|
||||
if( jt->IsLocked() )
|
||||
return SH_INCOMPLETE;
|
||||
|
||||
|
@ -543,12 +549,6 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc
|
|||
p0_pushed += aForce.Resize( 2 ); // make sure pushed via does not overlap with any existing joint
|
||||
}
|
||||
|
||||
if( !jt )
|
||||
{
|
||||
TRACEn( 1, "weird, can't find the center-of-via joint\n" );
|
||||
return SH_INCOMPLETE;
|
||||
}
|
||||
|
||||
PNS_VIA* pushedVia = aVia->Clone();
|
||||
pushedVia->SetPos( p0_pushed );
|
||||
pushedVia->Mark( aVia->Marker() );
|
||||
|
|
|
@ -541,8 +541,12 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
delete item;
|
||||
m_board->m_Modules->Add( converted );
|
||||
m_view->Add( converted );
|
||||
|
||||
if( converted )
|
||||
{
|
||||
m_board->m_Modules->Add( converted );
|
||||
m_view->Add( converted );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue