From 36696576564d93eeef6782f14427b7bdfeba55ca Mon Sep 17 00:00:00 2001 From: Atermonera Date: Mon, 24 Aug 2020 21:30:48 -0700 Subject: [PATCH] Fixes Runtime in vchat_client.dm,85: Cannot execute null.is preference enabled (#7557) --- code/modules/vchat/vchat_client.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index 4a2288faac..6890f0ba4c 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -82,7 +82,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic become_broken() return FALSE - if(!owner.is_preference_enabled(/datum/client_preference/vchat_enable)) + if(!owner?.is_preference_enabled(/datum/client_preference/vchat_enable)) become_broken() return FALSE @@ -298,12 +298,12 @@ GLOBAL_LIST_EMPTY(bicon_cache) // Cache of the tag results, not the icons var/atom/A = obj var/key var/changes_often = ishuman(A) || isobserver(A) // If this ends up with more, move it into a proc or var on atom. - + if(changes_often) key = "\ref[A]" else key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]" - + var/base64 = GLOB.bicon_cache[key] // Non-human atom, no cache if(!base64) // Doesn't exist, make it.