Fixes soap cleaning runtime

If you tried to clean an atom with soap, and that atom was deleted
before you finished cleaning, the message attempting to display its name
would runtime.
This commit is contained in:
Krausus
2015-05-16 02:14:34 -04:00
parent 505531f1a6
commit 224f0ff1d9
@@ -57,7 +57,7 @@
user << "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>"
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("<span class='warning'>[user] begins to scrub \the [target.name] out with [src].</span>")
if(do_after(user, src.cleanspeed))
if(do_after(user, src.cleanspeed) && target)
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
del(target)
else