summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2018-08-26 11:55:58 +0200
committerAndrea Catania <info@andreacatania.com>2018-08-26 11:55:58 +0200
commit2e722caeadeb20285ea077417e6e67baf354e6c1 (patch)
treec639383b3ddf18b47bfd567b7e0f7cc8610592a9 /editor
parentc2a9cb343b425dec1d145552d25a3f2021bd0449 (diff)
Fixed physics bone crash: #20397
Diffstat (limited to 'editor')
-rw-r--r--editor/spatial_editor_gizmos.cpp8
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;