adding a null check escape to the activeItem. On right click back to root window active item becomes null instead of root item

This commit is contained in:
amer cerkic 2019-07-03 11:05:38 -07:00
parent a3ec365f6c
commit 39fd16fc9e

View file

@ -5109,7 +5109,7 @@ void Application::idle() {
// If the offscreen Ui has something active that is NOT the root, then assume it has keyboard focus.
if (offscreenUi && offscreenUi->getWindow()) {
auto activeFocusItem = offscreenUi->getWindow()->activeFocusItem();
if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
if (_keyboardDeviceHasFocus && (activeFocusItem != NULL && activeFocusItem != offscreenUi->getRootItem())) {
_keyboardMouseDevice->pluginFocusOutEvent();
_keyboardDeviceHasFocus = false;
synthesizeKeyReleasEvents();