Browse Source

Fix crash on attempting to rename preset to the same name

Ivan Savenko 11 tháng trước cách đây
mục cha
commit
f3e8291ecd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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();