[MIRROR] (Partially) Fixes Out Of Memory crashes (#10092)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-07 08:36:42 -07:00
committed by GitHub
parent 133f37de97
commit ec71611656
31 changed files with 124 additions and 67 deletions

View File

@@ -282,6 +282,8 @@ SUBSYSTEM_DEF(transcore)
// Called from body_record to add itself to the transcore.
/datum/transcore_db/proc/add_body(var/datum/transhuman/body_record/BR)
ASSERT(BR)
if(body_scans[BR.mydna.name])
qdel(body_scans[BR.mydna.name])
body_scans[BR.mydna.name] = BR
body_scans = sortAssoc(body_scans)
log_debug("Added [BR.mydna.name] to transcore body DB.")