Corrected an error that happens if a layout file read flags a

timestamp error, causing a segfault because it runs HashKill on
a hash table that was never initialized.
This commit is contained in:
Tim Edwards 2021-11-25 13:20:28 -05:00
parent 8957d4b947
commit 24e2991fe3
1 changed files with 3 additions and 1 deletions

View File

@ -420,6 +420,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
Rect r;
int n = 1, d = 1;
HashTable dbUseTable;
bool needcleanup = FALSE;
/*
* It's very important to disable interrupts during the body of
@ -666,6 +667,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
rp = &r;
UndoDisable();
HashInit(&dbUseTable, 32, HT_STRINGKEYS);
needcleanup = TRUE;
while (TRUE)
{
/*
@ -873,7 +875,7 @@ done:
cellDef->cd_flags |= CDSTAMPSCHANGED|CDGETNEWSTAMP;
}
HashKill(&dbUseTable);
if (needcleanup) HashKill(&dbUseTable);
UndoEnable();
/* Disabled 3/16/2021. Let <<checkpaint>> in file force a DRC check */
/* DRCCheckThis(cellDef, TT_CHECKPAINT, (Rect *) NULL); */