Merge remote-tracking branch 'origin/GP-0_dev747368_fix_archiveremappedheadlesstest' into Ghidra_10.3

This commit is contained in:
Ryan Kurtz
2023-05-04 11:47:43 -04:00
@@ -169,8 +169,13 @@ public class DefaultDataTypeArchiveService implements DataTypeArchiveService {
protected DataTypeManagerInfo addDTM(DataTypeManagerInfo dtmInfo) throws DuplicateIdException {
DataTypeManagerInfo existingDTM = openDTMs.get(dtmInfo.dtm.getUniversalID());
if (existingDTM != null) {
dtmInfo.dtm.close();
throw new DuplicateIdException(dtmInfo.name(), existingDTM.name());
if (existingDTM.isClosed()) {
openDTMs.remove(dtmInfo.dtm.getUniversalID());
}
else {
dtmInfo.dtm.close();
throw new DuplicateIdException(dtmInfo.name(), existingDTM.name());
}
}
openDTMs.put(dtmInfo.dtm.getUniversalID(), dtmInfo);
afterAddDataTypeManager(dtmInfo);