1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-11 03:16:41 +00:00

Remove AddProtection count > 0 assert (#3315)

This commit is contained in:
gdkchan 2022-05-04 14:07:10 -03:00 committed by GitHub
parent 256514c7c9
commit 074190e03c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -469,14 +469,12 @@ namespace Ryujinx.Memory.WindowsShared
{
ulong endAddress = address + size;
var overlaps = Array.Empty<IntervalTreeNode<ulong, MemoryPermission>>();
int count = 0;
int count;
lock (_protections)
{
count = _protections.Get(address, endAddress, ref overlaps);
Debug.Assert(count > 0);
if (count == 1 &&
overlaps[0].Start <= address &&
overlaps[0].End >= endAddress &&
@ -574,7 +572,7 @@ namespace Ryujinx.Memory.WindowsShared
{
ulong endAddress = address + size;
var overlaps = Array.Empty<IntervalTreeNode<ulong, MemoryPermission>>();
int count = 0;
int count;
lock (_protections)
{