From 5f3331f6914b5b2726c5a001944a39ad65a6b896 Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Sun, 19 Nov 2023 03:02:18 -0800 Subject: [PATCH] Fix null parent crash in radial slice clicked() (#4949) function # About the pull request Same method as https://github.com/cmss13-devs/cmss13/pull/4948 ![image](https://github.com/cmss13-devs/cmss13/assets/41448081/c11029df-2442-4698-8002-da8625c0c7a0) --- code/_onclick/hud/radial.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index cfc6c4d034fb..4a23ebd882d3 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -34,6 +34,12 @@ GLOBAL_LIST_EMPTY(radial_menus) /atom/movable/screen/radial/slice/clicked(mob/user) + if(QDELETED(src)) + return + + if(!parent) + CRASH("clicked() called on a radial slice with a null parent while not deleted/deleting") + if(user.client == parent.current_user) if(next_page) parent.next_page()