Browse Source

Merge pull request #68505 from Rindbee/delete-unused-TreeItems

Fix memory leak in `EditorSettingsDialog`
Rémi Verschelde 2 năm trước cách đây
mục cha
commit
8621d3c147
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      editor/editor_settings_dialog.cpp

+ 1 - 0
editor/editor_settings_dialog.cpp

@@ -487,6 +487,7 @@ void EditorSettingsDialog::_update_shortcuts() {
 		TreeItem *section = E.value;
 		if (section->get_first_child() == nullptr) {
 			root->remove_child(section);
+			memdelete(section);
 		}
 	}
 }