Fix crash when running PNS Router Dump (pressing 0)
Some ITEMs don't have a Parent
This commit is contained in:
parent
196fc67ece
commit
f4f1ca352a
|
@ -290,8 +290,10 @@ const std::string ITEM::Format() const
|
|||
std::stringstream ss;
|
||||
ss << KindStr() << " ";
|
||||
|
||||
if( Parent()->IsConnected() )
|
||||
if( Parent() && Parent()->IsConnected() )
|
||||
ss << "net " << static_cast<BOARD_CONNECTED_ITEM*>( Parent() )->GetNetCode() << " ";
|
||||
else
|
||||
ss << "net " << Net() << " ";
|
||||
|
||||
ss << "layers " << m_layers.Start() << " " << m_layers.End();
|
||||
return ss.str();
|
||||
|
|
Loading…
Reference in New Issue