mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
Corrected two potentially fatal errors: (1) Code doing the PDK_PATH
and HOME substitution in filenames needs to watch for a NULL cd_file, and (2) The routine that removes the (UNNAMED) cell when another cell is loaded needs to NULL the boxRootDef pointer or else it ends up pointing to deallocated memory.
This commit is contained in:
@@ -790,6 +790,31 @@ DBWSetBox(rootDef, rect)
|
||||
dbwRecordBoxArea(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* DBWResetBox() ---
|
||||
*
|
||||
* Make sure that boxRootDef is set to NULL if it is equal to the
|
||||
* specified CellDef. This is used by the cell delete function to
|
||||
* make sure that if an edit cell is deleted, the boxRootDef is not
|
||||
* pointing to an invalid area of memory.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Global variable boxRootDef may be set to NULL.
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
DBWResetBox(CellDef *def)
|
||||
{
|
||||
if (def == boxRootDef)
|
||||
boxRootDef = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* ToolMoveBox --
|
||||
|
||||
Reference in New Issue
Block a user