From 2448bdcc82e4a8d4f2b5da2bf97159463f38fd7a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 25 May 2022 21:19:59 -0500 Subject: [PATCH] [nostalgia/studio] Add null check for key input to active editor --- src/nostalgia/studio/studioapp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/studio/studioapp.cpp b/src/nostalgia/studio/studioapp.cpp index 5b3352d4..34e86d03 100644 --- a/src/nostalgia/studio/studioapp.cpp +++ b/src/nostalgia/studio/studioapp.cpp @@ -92,7 +92,9 @@ void StudioUI::handleKeyEvent(core::Key key, bool down) noexcept { break; } } - m_activeEditor->keyStateChanged(key, down); + if (m_activeEditor) { + m_activeEditor->keyStateChanged(key, down); + } } void StudioUI::draw() noexcept {