diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-17 15:59:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-17 15:59:28 +0200 |
commit | 6d3935d42d3360b975fab867cb8db62e19b20001 (patch) | |
tree | 32ff2346042063d310fa14e5c4e347e9c44f7750 /editor | |
parent | 6e1fec0abc81bc337332f113674fdf1bf53cc6c6 (diff) | |
parent | 6a120107b330c5859f934080fc4dca1c83c3a6ab (diff) | |
download | redot-engine-6d3935d42d3360b975fab867cb8db62e19b20001.tar.gz |
Merge pull request #77160 from KoBeWi/Control_is_invertebrate
Fix crash when trying to create bones from Control
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 05a024f913..2a04f7b174 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4592,6 +4592,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(); |