Corrected a failure to check for an invalid layer in the routine
that queries a default layer width. Otherwise this can cause a segfault, especially when a technology file has not been specified and the minimum tech is in effect.
This commit is contained in:
parent
eed9882bf2
commit
2d4fb51ae6
|
|
@ -4153,6 +4153,12 @@ DRCGetDefaultLayerWidth(ttype)
|
|||
DRCCookie *cptr;
|
||||
TileTypeBitMask *set;
|
||||
|
||||
if (ttype < 0)
|
||||
{
|
||||
TxError("Error: Attempt to get default width of invalid layer!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (cptr = DRCCurStyle->DRCRulesTbl[TT_SPACE][ttype]; cptr != (DRCCookie *) NULL;
|
||||
cptr = cptr->drcc_next)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue