Corrected an error in lefWrite where SelectClear() is called

without SelectRootDef being set, which causes SelectClear() to
return without doing anything.  However---question is why
SelectClear() needs SelectRootDef to be non-NULL since it is
clearing the selection, not the selection source.  For now, just
patching the failing case, not trying to mess with the whole
selection mechanism.
This commit is contained in:
Tim Edwards 2024-03-08 12:28:29 -05:00
parent eeeaf49ec7
commit cb73ebfab0
1 changed files with 5 additions and 0 deletions

View File

@ -1496,6 +1496,11 @@ lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster)
Rect carea;
labelLinkedList *newlll;
/* SelectClear() requires SelectRootDef be non-NULL, although
* this might be an error in SelectClear(), since SelectClear()
* clears the selection, not the source.
*/
if (SelectRootDef == NULL) SelectRootDef = lefFlatDef;
SelectClear();
if (pinonly == 0)
carea = labr;