Explorar o código

Fix crash on attempting to rename preset to the same name

Ivan Savenko hai 9 meses
pai
achega
f3e8291ecd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      launcher/startGame/StartGameTab.cpp

+ 1 - 1
launcher/startGame/StartGameTab.cpp

@@ -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();