Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bad USB: fix crash when selecting a keyboard layout
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (flipperdevices#3403), 2024-03-25) changed the life-cycle of the bad_usb_script object, so that the bad_usb_script is allocated when entering the work scene, and freed when going to the config scene. It also made it so that the keyboard layout always gets reloaded when entering the work scene. The logic of the layout config scene, however, assumes that it still needs to reload the keyboard layout after selecting it. The keyboard layout data is stored within bad_usb_script however, which is NULL when within the layout config scene. The fix is simple. Since we are now reload the keyboard layout anyway when entering the work scene, we can just remove this extra call. Resolves: flipperdevices#3552
- Loading branch information