Fix hard del/race condition in reflections (#93328)

## About The Pull Request

Tin, the proc that's managing references should remove the thing from
the list before calling qdel on it. Also, it should not be calling qdel
on something that's already being qdeleted (which could happen before if
`nuke_reflection()` was reached via the `COMSIG_QDELING` signal).

<img width="1675" height="480" alt="firefox_xIIRCIbgdU"
src="https://github.com/user-attachments/assets/246be9de-6ff0-46a5-bf5e-1d0895fd9f55"
/>


## Why It's Good For The Game

Less hard deletes

## Changelog

Not player facing/should get the hard deletes tag
This commit is contained in:
Bloop
2025-10-10 03:59:59 +02:00
committed by GitHub
parent 2c6656f1bd
commit b77cdda8a4
+2 -2
View File
@@ -148,9 +148,9 @@
SIGNAL_HANDLER
var/atom/movable/reflection = LAZYACCESS(reflected_movables, target)
if(reflection)
qdel(reflection)
LAZYREMOVE(reflected_movables, target)
if(!QDELETED(reflection))
qdel(reflection)
UnregisterSignal(target, check_reflect_signals)
UnregisterSignal(target, COMSIG_QDELETING)