summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-05-17 15:59:28 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-05-17 15:59:28 +0200
commit6d3935d42d3360b975fab867cb8db62e19b20001 (patch)
tree32ff2346042063d310fa14e5c4e347e9c44f7750 /editor
parent6e1fec0abc81bc337332f113674fdf1bf53cc6c6 (diff)
parent6a120107b330c5859f934080fc4dca1c83c3a6ab (diff)
downloadredot-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.cpp3
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();