mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed an issue where a reference to a deleted object could hang or crash the application.
This commit is contained in:
parent
15cb3a0525
commit
e56eaeb2bd
|
@ -237,7 +237,7 @@ namespace GamelistFileParser
|
|||
continue;
|
||||
}
|
||||
else if (!file->isArcadeAsset()) {
|
||||
const std::string& defaultName {file->metadata.get("name")};
|
||||
const std::string defaultName {file->metadata.get("name")};
|
||||
if (file->getType() == FOLDER) {
|
||||
file->metadata =
|
||||
MetaDataList::createFromXML(FOLDER_METADATA, fileNode, relativeTo);
|
||||
|
|
|
@ -329,7 +329,7 @@ bool SystemData::populateFolder(FileData* folder)
|
|||
// parameters instead of regular files. In these instances we remove the extension
|
||||
// from the metadata name so it does not show up in the gamelists and similar.
|
||||
if (isDirectory && extension != ".") {
|
||||
const std::string& folderName {newGame->metadata.get("name")};
|
||||
const std::string folderName {newGame->metadata.get("name")};
|
||||
newGame->metadata.set(
|
||||
"name", folderName.substr(0, folderName.length() - extension.length()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue