From ad58cb51e4c2b48396960a52f28cb24f12d270ad Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Fri, 4 Mar 2011 00:38:01 +0000 Subject: [PATCH] More runtime errors git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1156 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/Chemistry-Holder.dm | 1 + code/modules/admin/admin.dm | 3 +++ code/modules/mob/living/carbon/human/human.dm | 3 +++ 3 files changed, 7 insertions(+) diff --git a/code/WorkInProgress/Chemistry-Holder.dm b/code/WorkInProgress/Chemistry-Holder.dm index 41369f065c..72a5598e99 100644 --- a/code/WorkInProgress/Chemistry-Holder.dm +++ b/code/WorkInProgress/Chemistry-Holder.dm @@ -58,6 +58,7 @@ datum return the_id trans_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred. + if (!target) return var/total_transfered = 0 var/current_list_element = 1 var/datum/reagents/R = target.reagents diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a622642f81..bcb8c2cb65 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -625,6 +625,9 @@ var/showadminmessages = 1 if (href_list["adminplayeropts"]) var/mob/M = locate(href_list["adminplayeropts"]) + if(!M) + usr << "You seem to be selecting a mob that doesn't exist." + return var/dat = "Options for [M.key]" var/foo = "\[ " if (ismob(M) && M.client) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 384295cc80..4b68dd8c56 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -900,6 +900,9 @@ if (src.head) for(var/i=1, i<=src.head.allowed.len, i++) // world << "[src.head.allowed[i]] and [W.type]" + if(!W) + src << "The code is under the impression that the item you're trying to stick in your hat doesn't exist." + return if (findtext("[W.type]","[src.head.allowed[i]]") || istype(W, /obj/item/weapon/pen)) confirm = 1 break