Skip to content

Commit

Permalink
Handle parsing of corrupt Config.json and prevent crash on launch (#4…
Browse files Browse the repository at this point in the history
…309)

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

* Implement a cleaner solution to handle empty json object
  • Loading branch information
gnisman authored Jan 22, 2023
1 parent 4f293f8 commit dc30d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public static bool TryLoad(string path, out ConfigurationFileFormat configuratio
{
configurationFileFormat = JsonHelper.DeserializeFromFile<ConfigurationFileFormat>(path);

return true;
return configurationFileFormat.Version != 0;
}
catch
{
Expand Down

0 comments on commit dc30d94

Please sign in to comment.