From 98b05633b6a72846bfa561652ef3fe8922d93a01 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Tue, 27 Mar 2018 20:22:27 -0400 Subject: [PATCH] add check for valid screen; fixes test --- src/Vt102Emulation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 9cf4dc71..7756e6dd 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -1044,6 +1044,9 @@ 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) { isReadOnly = currentView->sessionController()->isReadOnly();