Fixed an evidence bag runtime error and added a few CRASH() checks to /obj/machinery/disposal

This commit is contained in:
Albert Iordache
2011-12-25 00:59:59 +02:00
parent 3580a685e6
commit 6f23ef6b22
3 changed files with 18 additions and 7 deletions
+9 -1
View File
@@ -73,9 +73,17 @@
if(isrobot(user))
return
else if (!isnull(I)) // As per code/game/atom_procs.dm, this shouldn't even be required, but for some reason is. -- Abi79
else
if(isnull(I)) // Added these calls to CRASH to diagnose a runtime error that may be one of the causes of erasure errors --Abi79
CRASH("disposal/attackby() was called, but I was nulled before calling user.drop_item()")
var/debug_item_name = I.name
user.drop_item()
if(isnull(I))
CRASH("disposal/attackby() was called with [debug_item_name] as I, but I was nulled after calling user.drop_item()")
I.loc = src
user << "You place \the [I] into the [src]."
for(var/mob/M in viewers(src))