router: fix segfault on misnamed DP complementary net

This commit is contained in:
Tomasz Wlostowski 2015-03-05 10:01:54 +01:00 committed by Maciej Suminski
parent 6a016742c9
commit 504c8bf286
1 changed files with 8 additions and 2 deletions

View File

@ -485,8 +485,14 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
netNameP = netNameBase + suffix;
}
int netP = brd->FindNet( netNameP )->GetNet();
int netN = brd->FindNet( netNameN )->GetNet();
NETINFO_ITEM* netInfoP = brd->FindNet( netNameP );
NETINFO_ITEM* netInfoN = brd->FindNet( netNameN );
if( !netInfoP || !netInfoN )
return false;
int netP = netInfoP->GetNet();
int netN = netInfoN->GetNet();
if( primP )
refNet = netN;