diff options
author | t895 <clombardo169@gmail.com> | 2024-02-16 21:11:47 -0500 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2024-02-16 21:11:47 -0500 |
commit | ac33847b3005dab85bc8e5792188713b973c4b1e (patch) | |
tree | cd0c0816d125544e0a3605e7720f622611abe6c5 /src/hid_core/frontend | |
parent | 18494b0ad6b62bf0de677b8e443edd6c86804eca (diff) |
hid_core: Prevent crash if we try to iterate through empty color devices list
Diffstat (limited to 'src/hid_core/frontend')
-rw-r--r-- | src/hid_core/frontend/emulated_controller.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hid_core/frontend/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cpp index b4b6fa7c8..8b5d0eec6 100644 --- a/src/hid_core/frontend/emulated_controller.cpp +++ b/src/hid_core/frontend/emulated_controller.cpp @@ -581,6 +581,9 @@ void EmulatedController::DisableConfiguration() { // Get Joycon colors before turning on the controller for (const auto& color_device : color_devices) { + if (color_device == nullptr) { + continue; + } color_device->ForceUpdate(); } |