mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes possible runtime when sensor is destroyed while open in computer.
This commit is contained in:
@@ -77,13 +77,15 @@
|
||||
if(!grid_sensors)
|
||||
t += "Unable to connect to sensor!"
|
||||
else
|
||||
var/obj/machinery/power/sensor/OKS
|
||||
var/obj/machinery/power/sensor/OKS = null
|
||||
for(var/obj/machinery/power/sensor/S in grid_sensors)
|
||||
if(S.name_tag == active_sensor)
|
||||
OKS = S
|
||||
|
||||
t += "<B>[OKS.name_tag] - Sensor Reading</B><BR>"
|
||||
t += OKS.ReturnReading()
|
||||
if(OKS)
|
||||
t += "<B>[OKS.name_tag] - Sensor Reading</B><BR>"
|
||||
t += OKS.ReturnReading()
|
||||
else
|
||||
t += "Unable to connect to sensor!"
|
||||
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user