Skip to content

Commit

Permalink
Add code to handle an exception in LM patch code.
Browse files Browse the repository at this point in the history
  • Loading branch information
num0005 committed Jul 5, 2024
1 parent 65f8a97 commit 73d864f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Launcher/Utility/H2ToolLightmapFixInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public Task<bool> Inject(Guid id, System.Diagnostics.Process process)
Trace.WriteLine($"[H2 LM Patcher] Done patching");

return Task.FromResult(true);
} catch(Exception ex)
{
Trace.WriteLine($"[H2 LM Patcher] Unexpected expection, bailing out: {ex}");

return Task.FromResult(false);
} finally
{
NtResumeProcess(process.Handle);
Expand Down

0 comments on commit 73d864f

Please sign in to comment.