summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Kaltenbrunner <moritzkalt37@gmail.com>2021-06-12 21:30:36 +0200
committerMoritz Kaltenbrunner <moritzkalt37@gmail.com>2021-06-12 21:30:36 +0200
commit8168fdb8f6e98033e6959cd15a927de1d46960f3 (patch)
tree6e92961250b19d5e1d8e9b22959e4fae31bdee15
parentfe7559f751e81b21da2eb8252123f384b8a8622d (diff)
Fixed crash on calling set_editor_draw without properly setup
SkeletonModification
-rw-r--r--scene/resources/skeleton_modification_2d.cpp4
1 files changed, 3 insertions, 1 deletions
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
}