From cab176618a03acc6a2a697a160d835c2e9280cb8 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Sat, 8 Dec 2012 01:14:50 +0000 Subject: [PATCH] Runtime fixes: Fixed a runtime caused by someone holding an input window open with the RD Core Computer. Fixed a runtime caused by an area being null... I have no idea how this is even possible. Tracking the source of the problem will take ages. Added a check for range and source in hear(). Again.. I'm not sure how this ever even fails. This may also fix a runtime in say() code where it's trying to compare a list of objects to the character "0". git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5282 316c924e-a436-60f5-8080-3fe189b3f50e --- code/__HELPERS/game.dm | 2 ++ code/game/atoms_movable.dm | 2 +- code/modules/research/rdconsole.dm | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 463aa01beef..390716c4a37 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -37,6 +37,8 @@ /proc/hear(var/range, var/atom/source) + if(!source || range == null) return + var/lum = source.luminosity source.luminosity = 6 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 86bce8b00ce..ad3ca36fbd7 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -90,7 +90,7 @@ - while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) + while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up if(error < 0) var/atom/step = get_step(src, dy) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index a94d9c6f714..6c74d7cd87c 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -266,7 +266,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, usr << "\red The destructive analyzer is busy at the moment." else var/choice = input("Proceeding will destroy loaded item.") in list("Proceed", "Cancel") - if(choice == "Cancel") return + if(choice == "Cancel" || !linked_destroy) return linked_destroy.busy = 1 screen = 0.1 updateUsrDialog()