diff --git a/env.cmake b/env.cmake index 8aa5198c3..bc50a8fdc 100644 --- a/env.cmake +++ b/env.cmake @@ -1 +1 @@ -set(TOOLCHAIN_PATH "/usr" CACHE INTERNAL "") +set(TOOLCHAIN_PATH "/home/robert/toolchain/gcc-arm-none-eabi-8-2018-q4-major" CACHE INTERNAL "") diff --git a/module-gui/gui/widgets/Window.cpp b/module-gui/gui/widgets/Window.cpp index 23486edb8..edf02ac3a 100644 --- a/module-gui/gui/widgets/Window.cpp +++ b/module-gui/gui/widgets/Window.cpp @@ -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);