1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-08 22:26:51 +02:00

Fix crash on attempting to rename preset to the same name

This commit is contained in:
Ivan Savenko
2025-01-18 19:48:06 +00:00
parent 92b2c175a7
commit f3e8291ecd

View File

@@ -468,7 +468,7 @@ void StartGameTab::on_buttonPresetRename_clicked()
currentName,
&ok);
if (ok && !newName.isEmpty())
if (ok && !newName.isEmpty() && newName != currentName)
{
getMainWindow()->getModView()->renamePreset(currentName, newName);
refreshPresets();