defs leak fix

This commit is contained in:
MihailRis 2024-03-20 02:21:27 +03:00
parent fcb4b1c38f
commit 4b25cc38d9

View File

@ -155,7 +155,14 @@ Content::Content(
drawGroups(std::move(drawGroups))
{}
Content::~Content() {}
Content::~Content() {
for (auto& entry : blockDefs) {
delete entry.second;
}
for (auto& entry : itemDefs) {
delete entry.second;
}
}
Block* Content::findBlock(std::string id) const {
auto found = blockDefs.find(id);