mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 12:56:27 -05:00
input: add a missing null pointer check
There's a few other places where the result of GetAruidData is accessed without a null check, but I couldn't find a code path that hits those.
This commit is contained in:
parent
3065ab0fd8
commit
8b47465586
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ void NpadAbstractPropertiesHandler::UpdateAllDeviceProperties() {
|
||||||
const auto npad_index = NpadIdTypeToIndex(npad_id_type);
|
const auto npad_index = NpadIdTypeToIndex(npad_id_type);
|
||||||
for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; aruid_index++) {
|
for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; aruid_index++) {
|
||||||
auto* data = applet_resource_holder->applet_resource->GetAruidData(aruid_index);
|
auto* data = applet_resource_holder->applet_resource->GetAruidData(aruid_index);
|
||||||
if (!data->flag.is_assigned) {
|
if (data == nullptr || !data->flag.is_assigned) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto& npad_entry = data->shared_memory_format->npad.npad_entry[npad_index];
|
auto& npad_entry = data->shared_memory_format->npad.npad_entry[npad_index];
|
||||||
|
|
Loading…
Reference in a new issue