From 2e722caeadeb20285ea077417e6e67baf354e6c1 Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Sun, 26 Aug 2018 11:55:58 +0200 Subject: Fixed physics bone crash: #20397 --- editor/spatial_editor_gizmos.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'editor') diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index 64638cdb1e..07b3c44807 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -1722,8 +1722,16 @@ void PhysicalBoneSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { return; Skeleton *sk(physical_bone->find_skeleton_parent()); + if (!sk) + return; + PhysicalBone *pb(sk->get_physical_bone(physical_bone->get_bone_id())); + if (!pb) + return; + PhysicalBone *pbp(sk->get_physical_bone_parent(physical_bone->get_bone_id())); + if (!pbp) + return; Vector points; -- cgit v1.2.3