mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Fixed an issue where entering a blank game name in the metadata editor would crash the application.
This commit is contained in:
parent
496e653ae7
commit
47523ba627
1
NEWS.md
1
NEWS.md
|
@ -46,4 +46,5 @@ v1.0.0
|
|||
* SystemView didn't properly loop the systems if only two systems were available
|
||||
* Hidden files still showed up if they had a gamelist.xml entry
|
||||
* On Unix, adding a hidden folder with a game in it crashed the application on startup
|
||||
* If the user tried to enter a blank game name in the metadata editor, the application would crash upon saving
|
||||
* Lots and lots of small bugs and inconsistencies fixed
|
||||
|
|
|
@ -287,7 +287,15 @@ void GuiMetaDataEd::save()
|
|||
if (mMetaDataDecl.at(i).isStatistic)
|
||||
continue;
|
||||
|
||||
mMetaData->set(mMetaDataDecl.at(i).key, mEditors.at(i)->getValue());
|
||||
// If the user has entered a blank game name, then set the name to the ROM
|
||||
// filename (minus the extension).
|
||||
if (mMetaDataDecl.at(i).key == "name" && mEditors.at(i)->getValue() == "") {
|
||||
mMetaData->set(mMetaDataDecl.at(i).key,
|
||||
Utils::FileSystem::getStem(mScraperParams.game->getPath()));
|
||||
}
|
||||
else {
|
||||
mMetaData->set(mMetaDataDecl.at(i).key, mEditors.at(i)->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Enter game in index.
|
||||
|
|
Loading…
Reference in a new issue