diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm index 5a826d4a3ca..82d4aff1678 100644 --- a/code/datums/chat_message.dm +++ b/code/datums/chat_message.dm @@ -73,9 +73,9 @@ var/list/runechat_image_cache = list() /datum/chatmessage/Destroy() if(owned_by) + UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING) LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src) owned_by.images.Remove(message) - UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING) if(message_loc) UnregisterSignal(message_loc, COMSIG_PARENT_QDELETING) owned_by = null @@ -96,6 +96,10 @@ var/list/runechat_image_cache = list() /datum/chatmessage/proc/generate_image(text, atom/target, mob/owner, list/extra_classes, lifespan) set waitfor = FALSE + if(!target || !owner) + qdel(src) + return + // Register client who owns this message owned_by = owner.client RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/qdel_self) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 1cb9e0b1c40..c4ee090ce85 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -213,10 +213,10 @@ * * Arguments: * * datum/target Datum to stop listening to signals from - * * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically + * * sig_type_or_types Signal string key or list of signal keys to stop listening to specifically */ /datum/proc/UnregisterSignal(datum/target, sig_type_or_types) - var/list/lookup = target.comp_lookup + var/list/lookup = target?.comp_lookup if(!signal_procs || !signal_procs[target] || !lookup) return if(!islist(sig_type_or_types)) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 8e4fd3970ea..18cd0ab7503 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -13,9 +13,13 @@ if(SP.speaking && SP.speaking.flags & INNATE) // Snowflake for noise lang if(radio) - return SP.speaking.format_message_radio(piece) + .["formatted"] = SP.speaking.format_message_radio(piece) + .["raw"] = piece + return else - return SP.speaking.format_message(piece) + .["formatted"] = SP.speaking.format_message(piece) + .["raw"] = piece + return if(iteration_count == 1) piece = capitalize(piece)