From b242c40dfd4dc66767d60b96d5ea1449891e2476 Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 4 Sep 2023 12:57:55 -0700 Subject: [PATCH] safety --- code/game/objects/structures/vulture_spotter.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/vulture_spotter.dm b/code/game/objects/structures/vulture_spotter.dm index 0a596b64a01a..a668cb562028 100644 --- a/code/game/objects/structures/vulture_spotter.dm +++ b/code/game/objects/structures/vulture_spotter.dm @@ -79,9 +79,10 @@ to_chat(scope.scope_user, SPAN_NOTICE("You notice that [scope] drifts less.")) RegisterSignal(scope, COMSIG_VULTURE_SCOPE_MOVED, PROC_REF(on_vulture_move)) RegisterSignal(scope, COMSIG_VULTURE_SCOPE_UNSCOPED, PROC_REF(on_vulture_unscope)) - RegisterSignal(user.client, COMSIG_PARENT_QDELETING, PROC_REF(do_unscope)) + if(user.client) + RegisterSignal(user.client, COMSIG_PARENT_QDELETING, PROC_REF(do_unscope)) + user.client.change_view(scope_zoom, src) RegisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED), PROC_REF(do_unscope)) - user.client.change_view(scope_zoom, src) user.see_in_dark += darkness_view user.lighting_alpha = 127 user.sync_lighting_plane_alpha()