From 8168fdb8f6e98033e6959cd15a927de1d46960f3 Mon Sep 17 00:00:00 2001 From: Moritz Kaltenbrunner Date: Sat, 12 Jun 2021 21:30:36 +0200 Subject: Fixed crash on calling set_editor_draw without properly setup SkeletonModification --- scene/resources/skeleton_modification_2d.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene/resources/skeleton_modification_2d.cpp b/scene/resources/skeleton_modification_2d.cpp index 9b07293965..b52a60006a 100644 --- a/scene/resources/skeleton_modification_2d.cpp +++ b/scene/resources/skeleton_modification_2d.cpp @@ -216,7 +216,9 @@ void SkeletonModification2D::set_editor_draw_gizmo(bool p_draw_gizmo) { editor_draw_gizmo = p_draw_gizmo; #ifdef TOOLS_ENABLED if (is_setup) { - stack->set_editor_gizmos_dirty(true); + if (stack) { + stack->set_editor_gizmos_dirty(true); + } } #endif // TOOLS_ENABLED } -- cgit v1.2.3