hid_core: Prevent crash if we try to iterate through empty color devices list
This commit is contained in:
parent
31b531fb2b
commit
95ea8e9553
1 changed files with 3 additions and 0 deletions
|
@ -581,6 +581,9 @@ void EmulatedController::DisableConfiguration() {
|
||||||
|
|
||||||
// Get Joycon colors before turning on the controller
|
// Get Joycon colors before turning on the controller
|
||||||
for (const auto& color_device : color_devices) {
|
for (const auto& color_device : color_devices) {
|
||||||
|
if (color_device == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
color_device->ForceUpdate();
|
color_device->ForceUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue