Removed hotfix for System.AccessViolationException error
This commit is contained in:
@@ -53,15 +53,6 @@ public class HttpResponseUtil(JsonUtil jsonUtil, ServerLocalisationService serve
|
||||
/// <returns>response as string</returns>
|
||||
public string GetBody<T>(T data, BackendErrorCodes err = BackendErrorCodes.None, string? errmsg = null, bool sanitize = true)
|
||||
{
|
||||
// No idea why, this fixes an AccessViolationException on release builds
|
||||
// Cast explicitly as object fixes this, exception happens in System.Text.Json?
|
||||
#if RELEASE
|
||||
if (typeof(T) == typeof(bool))
|
||||
{
|
||||
return sanitize ? ClearString(GetUnclearedBody<object>(data, err, errmsg)) : GetUnclearedBody<object>(data, err, errmsg);
|
||||
}
|
||||
#endif
|
||||
|
||||
return sanitize ? ClearString(GetUnclearedBody(data, err, errmsg)) : GetUnclearedBody(data, err, errmsg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user