Silicon UI check runtime (#973)

A missing sanity check was causing runtime errors whenever a borg had no cell, and had a nanoUI window open.
This commit is contained in:
skull132
2016-09-20 15:39:11 +03:00
committed by GitHub
parent 8ebb69fcab
commit 48c9b27143

View File

@@ -27,7 +27,7 @@
/mob/living/silicon/robot/shared_nano_interaction()
. = STATUS_INTERACTIVE
if(cell.charge <= 0)
if(!cell || (cell && cell.charge <= 0))
return STATUS_CLOSE
if(lockcharge)
. = STATUS_DISABLED