Calling WEAKREF with a /datum/weakref returns the input (#34315)

This commit is contained in:
Jordan Brown
2018-01-16 09:33:43 -05:00
committed by CitadelStationBot
parent ade3ded854
commit 9bd92eddf7

View File

@@ -1,5 +1,7 @@
/proc/WEAKREF(datum/input)
if(istype(input) && !QDELETED(input))
if(istype(input, /datum/weakref))
return input
if(!input.weak_reference)
input.weak_reference = new /datum/weakref(input)
return input.weak_reference