summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-01-31 19:13:23 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-02 18:37:05 +0100
commit0f69668fc61f7453b4c6451186b515762532c35a (patch)
treead7398e3270119d49a35052c88a2bd27400f7556 /src/core/hle/service
parentSVC: Enable CloseHandle, clean up DuplicateHandle (diff)
downloadyuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar.gz
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar.bz2
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar.lz
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar.xz
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.tar.zst
yuzu-0f69668fc61f7453b4c6451186b515762532c35a.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/hid/hid.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 835055af4..b6e4861d2 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -30,6 +30,8 @@ static s16 next_circle_y = 0;
* Gets a pointer to the PadData structure inside HID shared memory
*/
static inline PadData* GetPadData() {
+ if (g_shared_mem == nullptr)
+ return nullptr;
return reinterpret_cast<PadData*>(g_shared_mem->GetPointer().ValueOr(nullptr));
}