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()