Просмотр исходного кода

Handle parsing of corrupt Config.json and prevent crash on launch (#4309)

* Handle parsing of corrupt Config.json and prevent crash on launch

* Implement a cleaner solution to handle empty json object
gnisman 3 лет назад
Родитель
Сommit
dc30d94852
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs

+ 1 - 1
Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs

@@ -340,7 +340,7 @@ namespace Ryujinx.Ui.Common.Configuration
             {
                 configurationFileFormat = JsonHelper.DeserializeFromFile<ConfigurationFileFormat>(path);
 
-                return true;
+                return configurationFileFormat.Version != 0;
             }
             catch
             {