From 20d51c7d613841aaa27dd7fcd71dd5c2c5bdbcee Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 8 Jan 2022 17:15:24 +0200 Subject: [PATCH] Earlyports fix for inavtive vr pod traps Fixes inactive vr pods trapping the occupant due to a runtime error preventing the code from releasing the occupant. --- code/game/machinery/virtual_reality/vr_console.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm index 694d08fa13..4a83de34d3 100644 --- a/code/game/machinery/virtual_reality/vr_console.dm +++ b/code/game/machinery/virtual_reality/vr_console.dm @@ -185,7 +185,8 @@ if(!forced && avatar && tgui_alert(avatar, "Someone wants to remove you from virtual reality. Do you want to leave?", "Leave VR?", list("Yes", "No")) == "No") return - avatar.exit_vr() + if(avatar) + avatar.exit_vr() avatar = null if(occupant.client)