diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index e98c28e7dc..555dbe1cae 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -124,8 +124,8 @@ usr << "You can't clear the memory while playing or recording!" return else - storedinfo -= storedinfo - timestamp -= timestamp + if(storedinfo) storedinfo.Cut() + if(timestamp) timestamp.Cut() timerecorded = 0 usr << "Memory cleared." return diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index f567abc87e..8175482402 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -25,7 +25,7 @@ for (var/client/C in admin_list) if (src.holder.rank == "Admin Observer") C << "ADMIN: [key_name(usr, C)]: [msg]" - else if(C.holder.level != 0) + else if(C.holder && C.holder.level != 0) C << "ADMIN: [key_name(usr, C)] (JMP): [msg]" /client/proc/cmd_mod_say(msg as text) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 16fa20c5de..c007425c9b 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -226,7 +226,7 @@ /obj/item/weapon/paper/Topic(href, href_list) ..() - if((usr.stat || usr.restrained())) + if(!usr || (usr.stat || usr.restrained())) return if(href_list["write"]) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 63f9f9ab3d..a0f320873a 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -61,7 +61,7 @@ /obj/machinery/power/smes/proc/chargedisplay() - return round(5.5*charge/capacity) + return round(5.5*charge/(capacity ? capacity : 5e6)) #define SMESRATE 0.05 // rate of internal charge to external power diff --git a/code/modules/research/xenoarchaeology/artifact_analysis.dm b/code/modules/research/xenoarchaeology/artifact_analysis.dm index 1a83768937..5225b650e7 100644 --- a/code/modules/research/xenoarchaeology/artifact_analysis.dm +++ b/code/modules/research/xenoarchaeology/artifact_analysis.dm @@ -221,7 +221,7 @@ findarti++ cur_artifact = A if (findarti == 1) - if(cur_artifact.being_used) + if(cur_artifact && cur_artifact.being_used) var/message = "[src] states, \"Cannot analyse. Excess energy drain is disrupting signal.\"" src.visible_message(message, message) else