mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 06:17:43 +01:00
fix: Don't let a debugger crash Bink (#1892)
Resolves a problem where attaching a debugger can cause Bink to throw an exception, crashing the game.
This commit is contained in:
parent
336d85363e
commit
4a3e6df89e
2 changed files with 10 additions and 4 deletions
|
|
@ -13,8 +13,8 @@ namespace Dalamud.Game.Internal;
|
|||
[ServiceManager.EarlyLoadedService]
|
||||
internal sealed class AntiDebug : IInternalDisposableService
|
||||
{
|
||||
private readonly byte[] nop = new byte[] { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 };
|
||||
private byte[] original;
|
||||
private readonly byte[] nop = [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90];
|
||||
private byte[]? original;
|
||||
private IntPtr debugCheckAddress;
|
||||
|
||||
[ServiceManager.ServiceConstructor]
|
||||
|
|
@ -44,8 +44,8 @@ internal sealed class AntiDebug : IInternalDisposableService
|
|||
}
|
||||
|
||||
/// <summary>Finalizes an instance of the <see cref="AntiDebug"/> class.</summary>
|
||||
~AntiDebug() => this.Disable();
|
||||
|
||||
~AntiDebug() => ((IInternalDisposableService)this).DisposeService();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the anti-debugging is enabled.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue