From 81077df271a8e59df358ef488b4fb20a68c215cf Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Mon, 18 Jul 2022 02:10:00 -0400 Subject: [PATCH] Fixes runtime when mousing over items in nullspace (#68507) --- code/game/objects/items.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index a06a74cb6f3..af09bf5d02a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -971,7 +971,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/MouseEntered(location, control, params) . = ..() - if(((get(src, /mob) == usr) || src.loc.atom_storage || (src.item_flags & IN_STORAGE)) && !QDELETED(src)) + if(((get(src, /mob) == usr) || loc?.atom_storage || (item_flags & IN_STORAGE)) && !QDELETED(src)) //nullspace exists. var/mob/living/L = usr if(usr.client.prefs.read_preference(/datum/preference/toggle/enable_tooltips)) var/timedelay = usr.client.prefs.read_preference(/datum/preference/numeric/tooltip_delay) / 100 @@ -992,7 +992,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons remove_filter("hover_outline") /obj/item/proc/apply_outline(outline_color = null) - if(((get(src, /mob) != usr) && !src.loc.atom_storage && !(src.item_flags & IN_STORAGE)) || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow) + if(((get(src, /mob) != usr) && !loc?.atom_storage && !(item_flags & IN_STORAGE)) || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow) return FALSE var/theme = lowertext(usr.client?.prefs?.read_preference(/datum/preference/choiced/ui_style)) if(!outline_color) //if we weren't provided with a color, take the theme's color