mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix crash on attempting to rename preset to the same name
This commit is contained in:
@@ -468,7 +468,7 @@ void StartGameTab::on_buttonPresetRename_clicked()
|
|||||||
currentName,
|
currentName,
|
||||||
&ok);
|
&ok);
|
||||||
|
|
||||||
if (ok && !newName.isEmpty())
|
if (ok && !newName.isEmpty() && newName != currentName)
|
||||||
{
|
{
|
||||||
getMainWindow()->getModView()->renamePreset(currentName, newName);
|
getMainWindow()->getModView()->renamePreset(currentName, newName);
|
||||||
refreshPresets();
|
refreshPresets();
|
||||||
|
|||||||
Reference in New Issue
Block a user