1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00

Ensures safe startup.

This commit is contained in:
Thomas Harte 2020-07-09 23:06:32 -04:00
parent be1c3e9136
commit 56e5491e5c

View File

@ -759,7 +759,7 @@ void MainWindow::setWindowTitle() {
void MainWindow::changeEvent(QEvent *event) {
// Clear current key state upon any window activation change.
if(event->type() == QEvent::ActivationChange) {
if(machine && event->type() == QEvent::ActivationChange) {
const auto keyboardMachine = machine->keyboard_machine();
if(keyboardMachine) {
keyboardMachine->clear_all_keys();