fix null owner (#60928)

This commit is contained in:
Wayland-Smithy
2021-08-23 14:22:32 -07:00
committed by GitHub
parent e8973839df
commit fcb4f174d6
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -46,7 +46,10 @@
/datum/action/innate/dash/proc/charge()
current_charges = clamp(current_charges + 1, 0, max_charges)
owner.update_action_buttons_icon()
if(recharge_sound)
playsound(dashing_item, recharge_sound, 50, TRUE)
if(!owner)
return
owner.update_action_buttons_icon()
dashing_item.balloon_alert(owner, "[current_charges]/[max_charges] dash charges")
@@ -39,10 +39,13 @@
club.update_appearance()
current_charges = clamp(current_charges + 1, 0, max_charges)
owner.update_action_buttons_icon()
if(recharge_sound)
playsound(dashing_item, recharge_sound, 50, TRUE)
if(!owner)
return
owner.update_action_buttons_icon()
to_chat(owner, span_notice("[src] now has [current_charges]/[max_charges] charges."))
/obj/item/hierophant_club