diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 8ecb16b65f..0f499adf7d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -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();