Skip to content

Commit

Permalink
fix conversion crashing the game when exceptions are thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
dustdustinthewind committed Mar 2, 2020
1 parent 39ff3f7 commit ad7a795
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- The handling of Intralism maps with config v3, encrypted data, and/or Unlock Conditions.
- A game crash when converting invalid maps.

## [1.4.0-alpha] - 2020-02-24

Expand Down
19 changes: 16 additions & 3 deletions Pulsarc/Pulsarc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,27 @@ private async void ConvertMaps()
{
for (int i = 0; i < directories.Length; i++)
{
converter.Save(directories[i]);
try
{
converter.Save(directories[i]);
}
catch
{
PulsarcLogger.Warning($"Couldn't convert {directories[i]}");
}
}
}

// Otherwise convert one map
else
{
converter.Save(toConvert);
try
{
converter.Save(toConvert);
}
catch
{
PulsarcLogger.Warning($"Couldn't convert {toConvert}");
}
}

((SongSelection)ScreenManager.Screens.Peek()).RescanBeatmaps();
Expand Down
4 changes: 2 additions & 2 deletions Pulsarc/Pulsarc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<AssemblyName>Pulsarc</AssemblyName>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<StartupObject></StartupObject>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
<FileVersion>1.4.0.0</FileVersion>
<AssemblyVersion>1.4.1.0</AssemblyVersion>
<FileVersion>1.4.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ad7a795

Please sign in to comment.