1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fix crash when trying to create bones from Control

(cherry picked from commit 6a120107b3)
This commit is contained in:
kobewi
2023-05-18 19:22:23 +02:00
committed by Yuri Sizov
parent 9a88b47cb1
commit 7d5d5b7bd1

View File

@@ -4594,6 +4594,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
undo_redo->create_action(TTR("Create Custom Bone2D(s) from Node(s)"));
for (const KeyValue<Node *, Object *> &E : selection) {
Node2D *n2d = Object::cast_to<Node2D>(E.key);
if (!n2d) {
continue;
}
Bone2D *new_bone = memnew(Bone2D);
String new_bone_name = n2d->get_name();