diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 7756e6dd..d24c92b0 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -1044,11 +1044,8 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent *event) KeyboardTranslator::States states = KeyboardTranslator::NoState; TerminalDisplay * currentView = _currentScreen->currentTerminalDisplay(); - if (currentView == nullptr) { - return; - } bool isReadOnly = false; - if (currentView->sessionController() != nullptr) { + if (currentView != nullptr && currentView->sessionController() != nullptr) { isReadOnly = currentView->sessionController()->isReadOnly(); }