fixes runtime (#19576)

This commit is contained in:
Sirryan2002
2022-11-04 08:47:59 +01:00
committed by GitHub
parent 21109f3be2
commit df9fd05e0f
+4 -1
View File
@@ -345,12 +345,15 @@
if(computer == library_computer)
return TRUE //we're succesfully connected already, let player know it was a "succesful connection"
UnregisterSignal(computer, COMSIG_PARENT_QDELETING)
disconnect() //clear references to old computer, we have to unregister signals
computer = library_computer
RegisterSignal(library_computer, COMSIG_PARENT_QDELETING, .proc/disconnect)
return TRUE
/obj/item/barcodescanner/proc/disconnect()
if(!computer)
return //proc will runtime if computer is null
UnregisterSignal(computer, COMSIG_PARENT_QDELETING)
computer = null
/obj/item/barcodescanner/proc/scanID(obj/item/card/id/ID, mob/user)