Fixes possible runtime when sensor is destroyed while open in computer.

This commit is contained in:
Atlantiscze
2014-11-20 14:45:12 +01:00
parent 20571bf1ce
commit b6c7454f52

View File

@@ -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