mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-10-24 15:38:30 -04:00
Fixed crash where there is no focus widget in window.
This commit is contained in:
1 parent
838b4a6fda
commit
fdf231ddfa
2 files changed
+2
-2
No files matched your search
@@ -1 +1 @@
|
||||
set(TOOLCHAIN_PATH "/usr" CACHE INTERNAL "")
|
||||
set(TOOLCHAIN_PATH "/home/robert/toolchain/gcc-arm-none-eabi-8-2018-q4-major" CACHE INTERNAL "")
|
||||
@@ -88,7 +88,7 @@ bool Window::onInput( const InputEvent& inputEvent) {
|
||||
//if focused item didn't handle the key event and it was navigation key
|
||||
//check if moving focus is possible
|
||||
gui::Item* newFocusItem = nullptr;
|
||||
if( !res && inputEvent.state == InputEvent::State::keyReleasedShort ) {
|
||||
if( (!res) && (focusItem != nullptr ) && (inputEvent.state == InputEvent::State::keyReleasedShort) ) {
|
||||
switch( inputEvent.keyCode ) {
|
||||
case KeyCode::KEY_LEFT:
|
||||
newFocusItem = focusItem->getNavigationItem(gui::NavigationDirection::LEFT);
|
||||
|
||||
Reference in new issue
Block a user