Explorar o código

Fix memory leak in `EditorSettingsDialog`

Delete `TreeItem`s that are not in `Tree`, `TreeItem` needs to be deleted manually.
Rindbee %!s(int64=2) %!d(string=hai) anos
pai
achega
12787ad57d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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);
 		}
 	}
 }