diff options
author | Andrea Catania <info@andreacatania.com> | 2018-08-26 11:55:58 +0200 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2018-08-26 11:55:58 +0200 |
commit | 2e722caeadeb20285ea077417e6e67baf354e6c1 (patch) | |
tree | c639383b3ddf18b47bfd567b7e0f7cc8610592a9 /editor | |
parent | c2a9cb343b425dec1d145552d25a3f2021bd0449 (diff) |
Fixed physics bone crash: #20397
Diffstat (limited to 'editor')
-rw-r--r-- | editor/spatial_editor_gizmos.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<Vector3> points; |