summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_code_memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-01-08 00:32:10 +0100
committerGitHub <noreply@github.com>2023-01-08 00:32:10 +0100
commita5693afa03c03d46358329baa307d681a9661199 (patch)
treeafba0838ea4f07c31649ffdaec07cdc89e631780 /src/core/hle/kernel/k_code_memory.h
parentMerge pull request #9563 from german77/crash_not_allowed (diff)
downloadyuzu-a5693afa03c03d46358329baa307d681a9661199.tar
yuzu-a5693afa03c03d46358329baa307d681a9661199.tar.gz
yuzu-a5693afa03c03d46358329baa307d681a9661199.tar.bz2
yuzu-a5693afa03c03d46358329baa307d681a9661199.tar.lz
yuzu-a5693afa03c03d46358329baa307d681a9661199.tar.xz
yuzu-a5693afa03c03d46358329baa307d681a9661199.tar.zst
yuzu-a5693afa03c03d46358329baa307d681a9661199.zip
Diffstat (limited to 'src/core/hle/kernel/k_code_memory.h')
-rw-r--r--src/core/hle/kernel/k_code_memory.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_code_memory.h b/src/core/hle/kernel/k_code_memory.h
index 2e7e1436a..5b260b385 100644
--- a/src/core/hle/kernel/k_code_memory.h
+++ b/src/core/hle/kernel/k_code_memory.h
@@ -3,6 +3,8 @@
#pragma once
+#include <optional>
+
#include "common/common_types.h"
#include "core/device_memory.h"
#include "core/hle/kernel/k_auto_object.h"
@@ -49,11 +51,11 @@ public:
return m_address;
}
size_t GetSize() const {
- return m_is_initialized ? m_page_group.GetNumPages() * PageSize : 0;
+ return m_is_initialized ? m_page_group->GetNumPages() * PageSize : 0;
}
private:
- KPageGroup m_page_group{};
+ std::optional<KPageGroup> m_page_group{};
KProcess* m_owner{};
VAddr m_address{};
KLightLock m_lock;