1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix skeleton_3d & physical_bone_3d editor errors

This commit is contained in:
Samuele Panzeri
2023-04-29 23:17:47 +02:00
parent 9f12e7b52d
commit 679ff6da0e
2 changed files with 6 additions and 7 deletions

View File

@@ -96,8 +96,9 @@ void PhysicalBone3DEditorPlugin::make_visible(bool p_visible) {
}
void PhysicalBone3DEditorPlugin::edit(Object *p_node) {
selected = static_cast<PhysicalBone3D *>(p_node); // Trust it
ERR_FAIL_COND(!selected);
physical_bone_editor.set_selected(selected);
PhysicalBone3D *bone = Object::cast_to<PhysicalBone3D>(p_node);
if (bone) {
selected = bone;
physical_bone_editor.set_selected(selected);
}
}