Skip to content

Commit 4a38717

Browse files
JoltedJonArctis-Fireblight
authored andcommitted
GH-1183 Fix engine freeze when Skeleton3DEditor is deleted on item with many bones
1 parent 360a8d3 commit 4a38717

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

editor/scene/3d/skeleton_3d_editor_plugin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,9 @@ void Skeleton3DEditor::_joint_tree_button_clicked(Object *p_item, int p_column,
918918
}
919919

920920
void Skeleton3DEditor::_update_properties() {
921+
if (is_deleting) {
922+
return;
923+
}
921924
if (pose_editor) {
922925
pose_editor->_update_properties();
923926
}
@@ -1166,6 +1169,7 @@ void Skeleton3DEditor::_notification(int p_what) {
11661169
update_joint_tree();
11671170
} break;
11681171
case NOTIFICATION_PREDELETE: {
1172+
is_deleting = true;
11691173
if (editor_plugin) {
11701174
editor_plugin->skeleton_editor = nullptr;
11711175
}

editor/scene/3d/skeleton_3d_editor_plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class Skeleton3DEditor : public VBoxContainer {
146146
Button *edit_mode_button = nullptr;
147147

148148
bool edit_mode = false;
149+
bool is_deleting = false;
149150

150151
HBoxContainer *animation_hb = nullptr;
151152
Button *key_loc_button = nullptr;

0 commit comments

Comments
 (0)