Skip to content

Commit

Permalink
Fixes some auto observe runtimes (#13736)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmixo authored Aug 9, 2023
1 parent e34f109 commit c46c74b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(observetarget?.observers)
observetarget.observers -= src
UNSETEMPTY(observetarget.observers)
if(observetarget)
UnregisterSignal(observetarget, COMSIG_QDELETING)
observetarget = null

/mob/dead/observer/verb/dnr()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/observer/orbit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
. = TRUE
if("toggle_observe")
auto_observe = !auto_observe
if(auto_observe && !QDELETED(owner.orbiting.parent))
if(auto_observe && !QDELETED(owner?.orbiting?.parent))
owner.do_observe(owner.orbiting.parent)
else
owner.reset_perspective(null)
Expand Down

0 comments on commit c46c74b

Please sign in to comment.