Minor fix in ZONE_CONTAINER code.

This commit is contained in:
jean-pierre charras 2019-10-22 14:13:16 +02:00
parent 4813eb12e6
commit e621ae7538
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ public:
*/
int GetNetCode() const
{
return m_netinfo->GetNet();
return m_netinfo ? m_netinfo->GetNet() : -1;
}
/**

View File

@ -116,7 +116,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
// Now zone type and layer are set, transfer net info
// (has meaning only for copper zones)
SetNetCode( aZone.GetNetCode() );
m_netinfo = aZone.m_netinfo;
SetNeedRefill( aZone.NeedRefill() );
}