fix: only enable antidebug if it has not already been enabled

This commit is contained in:
Philpax 2021-11-06 20:29:24 +01:00
parent ad802d2cbf
commit ec55f673a1

View file

@ -144,12 +144,15 @@ namespace Dalamud
var configuration = Service<DalamudConfiguration>.Get();
var antiDebug = Service<AntiDebug>.Set();
if (configuration.IsAntiAntiDebugEnabled)
antiDebug.Enable();
#if DEBUG
if (!antiDebug.IsEnabled)
{
#if DEBUG
antiDebug.Enable();
#else
if (configuration.IsAntiAntiDebugEnabled)
antiDebug.Enable();
#endif
}
Log.Information("[T2] AntiDebug OK!");
Service<WinSockHandlers>.Set();