diff options
author | Andrea Catania <info@andreacatania.com> | 2018-09-22 10:14:52 +0200 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2018-09-22 10:14:52 +0200 |
commit | 855a440071897f757bcd60cf39008b1e374eab06 (patch) | |
tree | 25cbeba29db3f750e3739c7740ce754a9073d885 /editor/plugins | |
parent | 29e01f97e459867fbfe9bb065a6d81d577112d6a (diff) |
Removed node from physical_bone_plugin
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/physical_bone_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/physical_bone_plugin.cpp b/editor/plugins/physical_bone_plugin.cpp index 1c3c000808..1b4f66d6e4 100644 --- a/editor/plugins/physical_bone_plugin.cpp +++ b/editor/plugins/physical_bone_plugin.cpp @@ -70,12 +70,14 @@ PhysicalBoneEditor::PhysicalBoneEditor(EditorNode *p_editor) : } PhysicalBoneEditor::~PhysicalBoneEditor() { - // TODO the spatial_editor_hb should be removed from SpatialEditor, but in this moment it's not possible for (int i = spatial_editor_hb->get_child_count() - 1; 0 <= i; --i) { Node *n = spatial_editor_hb->get_child(i); spatial_editor_hb->remove_child(n); memdelete(n); } + if (spatial_editor_hb->get_parent()) { + spatial_editor_hb->get_parent()->remove_child(spatial_editor_hb); + } memdelete(spatial_editor_hb); } |