aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/hid_user.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-11-24 15:31:53 -0500
committerbunnei <bunneidev@gmail.com>2014-11-24 15:31:53 -0500
commitbb730855e58d18d8964d158a55822c40503d548f (patch)
tree9c3ff113839583d1deca837e9888d81f25d485a0 /src/core/hle/service/hid_user.cpp
parentef1b16a7eb3da11d18e68521ddd996e8f48f3aa1 (diff)
parent8189593255df8ab4abb699082f2c48baa3b0656b (diff)
Merge pull request #147 from yuriks/error-codes
Error codes
Diffstat (limited to 'src/core/hle/service/hid_user.cpp')
-rw-r--r--src/core/hle/service/hid_user.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp
index 5f6bf1eff..d29de1a52 100644
--- a/src/core/hle/service/hid_user.cpp
+++ b/src/core/hle/service/hid_user.cpp
@@ -34,10 +34,7 @@ static s16 next_circle_y = 0;
* Gets a pointer to the PadData structure inside HID shared memory
*/
static inline PadData* GetPadData() {
- if (0 == shared_mem)
- return nullptr;
-
- return reinterpret_cast<PadData*>(Kernel::GetSharedMemoryPointer(shared_mem, 0));
+ return reinterpret_cast<PadData*>(Kernel::GetSharedMemoryPointer(shared_mem, 0).ValueOr(nullptr));
}
/**