nullptr safety
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15906
This commit is contained in:
parent
e251bbd217
commit
00fb542146
|
@ -1753,6 +1753,8 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
|
|||
m_tuningPattern = PCB_TUNING_PATTERN::CreateNew( generatorTool, m_frame,
|
||||
m_pickerItem, mode );
|
||||
|
||||
if( m_tuningPattern )
|
||||
{
|
||||
int dummyDist;
|
||||
int dummyClearance = std::numeric_limits<int>::max() / 2;
|
||||
VECTOR2I closestPt;
|
||||
|
@ -1764,6 +1766,7 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
|
|||
|
||||
m_preview.Add( m_tuningPattern );
|
||||
}
|
||||
}
|
||||
else if( m_pickerItem && m_tuningPattern )
|
||||
{
|
||||
// Second click; we're done
|
||||
|
|
Loading…
Reference in New Issue