Fix click catcher runtime

Check that a turf exists when attempting to click it
This can happen if someone manages to click off the edge of the Z-level

The following runtime has occured 48 time(s).
runtime error: Cannot execute null.Click().
proc name: Click (/obj/screen/click_catcher/Click)
  source file: click.dm,345
  usr: Drone (758) (/mob/living/simple_animal/drone)
  src:  (/obj/screen/click_catcher)
This commit is contained in:
Bjorn Neergaard
2016-02-09 23:06:43 -06:00
parent cbd37b6e77
commit 72fbf9a181
+2 -1
View File
@@ -342,5 +342,6 @@
C.swap_hand()
else
var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
T.Click(location, control, params)
if(T)
T.Click(location, control, params)
return 1