소스 검색

Fix memory leak in `EditorSettingsDialog`

Delete `TreeItem`s that are not in `Tree`, `TreeItem` needs to be deleted manually.
Rindbee 2 년 전
부모
커밋
12787ad57d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);
 		}
 	}
 }