diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 7cad8ab9d69..2883c5ca5df 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -207,6 +207,7 @@ proc/listclearnulls(list/list) //Mergsort: does the actual sorting and returns the results back to sortAtom /proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1) + if(!L || !R) return 0 var/Li=1 var/Ri=1 var/list/result = new() diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index fec0900cf1b..db7e4dc3ecb 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1385,6 +1385,7 @@ proc/is_hot(obj/item/W as obj) //Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape. /proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + if(!istype(W)) return 0 if(!W) return 0 if(W.sharp) return 1 return ( \