summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-10-27 03:35:19 +0200
committerLiam <byteslice@airmail.cc>2022-10-27 14:28:02 +0200
commit2cdfbbc07d74548527fbefd738f860ce66f52e34 (patch)
treed80f66ca3c2f53d46bb4cc20c9fa29d377da14eb /src/core/hle/service/nvdrv/devices
parentvi: implement CloseDisplay (diff)
downloadyuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.gz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.bz2
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.lz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.xz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.zst
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.zip
Diffstat (limited to 'src/core/hle/service/nvdrv/devices')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvmap.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp
index b60679021..44388655d 100644
--- a/src/core/hle/service/nvdrv/devices/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp
@@ -251,10 +251,12 @@ NvResult nvmap::IocFree(const std::vector<u8>& input, std::vector<u8>& output) {
}
if (auto freeInfo{file.FreeHandle(params.handle, false)}) {
- ASSERT(system.CurrentProcess()
- ->PageTable()
- .UnlockForDeviceAddressSpace(freeInfo->address, freeInfo->size)
- .IsSuccess());
+ if (freeInfo->can_unlock) {
+ ASSERT(system.CurrentProcess()
+ ->PageTable()
+ .UnlockForDeviceAddressSpace(freeInfo->address, freeInfo->size)
+ .IsSuccess());
+ }
params.address = freeInfo->address;
params.size = static_cast<u32>(freeInfo->size);
params.flags.raw = 0;