diff options
| author | german77 <juangerman-13@hotmail.com> | 2024-02-05 16:59:13 -0600 |
|---|---|---|
| committer | german77 <juangerman-13@hotmail.com> | 2024-02-05 17:17:21 -0600 |
| commit | 372897aac42192bb0290e7ac74e1ae8d15f53a55 (patch) | |
| tree | 7cbd5f742c67fcfadd6d34ae807d940d178c1da2 /src/hid_core/resources/touch_screen | |
| parent | a2f23746c26e0882ff8ffadc814a09859efe54e2 (diff) | |
service: hid: Ensure aruid data is initialized
Diffstat (limited to 'src/hid_core/resources/touch_screen')
| -rw-r--r-- | src/hid_core/resources/touch_screen/touch_screen_resource.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp index 56e8e8e51..c39321915 100644 --- a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp +++ b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp @@ -63,7 +63,7 @@ Result TouchResource::ActivateTouch(u64 aruid) { auto* applet_data = applet_resource->GetAruidDataByIndex(aruid_index); TouchAruidData& touch_data = aruid_data[aruid_index]; - if (!applet_data->flag.is_assigned) { + if (applet_data == nullptr || !applet_data->flag.is_assigned) { touch_data = {}; continue; } @@ -124,7 +124,7 @@ Result TouchResource::ActivateGesture(u64 aruid, u32 basic_gesture_id) { auto* applet_data = applet_resource->GetAruidDataByIndex(aruid_index); TouchAruidData& touch_data = aruid_data[aruid_index]; - if (!applet_data->flag.is_assigned) { + if (applet_data == nullptr || !applet_data->flag.is_assigned) { touch_data = {}; continue; } @@ -324,7 +324,7 @@ Result TouchResource::SetTouchScreenConfiguration( const auto* applet_data = applet_resource->GetAruidDataByIndex(aruid_index); TouchAruidData& data = aruid_data[aruid_index]; - if (!applet_data->flag.is_assigned) { + if (applet_data == nullptr || !applet_data->flag.is_assigned) { continue; } if (aruid != data.aruid) { @@ -344,7 +344,7 @@ Result TouchResource::GetTouchScreenConfiguration( const auto* applet_data = applet_resource->GetAruidDataByIndex(aruid_index); const TouchAruidData& data = aruid_data[aruid_index]; - if (!applet_data->flag.is_assigned) { + if (applet_data == nullptr || !applet_data->flag.is_assigned) { continue; } if (aruid != data.aruid) { |
