Skip to content

Commit

Permalink
Fix issue with null hud_used in stop_tracking_resin_mark (#4948)
Browse files Browse the repository at this point in the history
# About the pull request

![image](https://github.com/cmss13-devs/cmss13/assets/41448081/f061830e-975f-49fb-b17e-a139fc5bff09)

Fixes above runtime.

Unsure if `hud_used` being null is because this is being called during
the destroy process of the xeno, or if it's a deeper issue. I've put in
a crash to test.
  • Loading branch information
Zonespace27 committed Nov 19, 2023
1 parent f544b82 commit 5ac1975
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,12 @@
to_chat(src, SPAN_INFO("shift click the compass to watch the mark, alt click to stop tracking"))

/mob/living/carbon/xenomorph/proc/stop_tracking_resin_mark(destroyed, silent = FALSE) //tracked_marker shouldnt be nulled outside this PROC!! >:C
if(QDELETED(src))
return

if(!hud_used)
CRASH("hud_used is null in stop_tracking_resin_mark")

var/atom/movable/screen/mark_locator/ML = hud_used.locate_marker
ML.overlays.Cut()

Expand Down

0 comments on commit 5ac1975

Please sign in to comment.