diff options
author | Chris Xiong <chirs241097@gmail.com> | 2021-11-08 00:08:30 -0500 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2021-11-08 00:08:30 -0500 |
commit | dd572e4448e577852d2946b4944e260a278c5ef7 (patch) | |
tree | b54916b7f7d41a2abe38c2b80a35797188e43fd7 /simple-visualization | |
parent | 2385b7db19402a18de95d3691ed1bb3dd5333b3b (diff) | |
download | QMidiPlayer-dd572e4448e577852d2946b4944e260a278c5ef7.tar.xz |
Fix weird crash caused by updating text of invisible labels.
Diffstat (limited to 'simple-visualization')
-rw-r--r-- | simple-visualization/qmpkeyboardwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simple-visualization/qmpkeyboardwindow.cpp b/simple-visualization/qmpkeyboardwindow.cpp index b33bb4b..79e5fe3 100644 --- a/simple-visualization/qmpkeyboardwindow.cpp +++ b/simple-visualization/qmpkeyboardwindow.cpp @@ -29,6 +29,7 @@ qmpKeyboardWindow::qmpKeyboardWindow(qmpPluginAPI *_api, QWidget *parent): { const SEvent *e = (const SEvent *)ee; int ch = e->type & 0xF; + if (!this->isVisible()) return; if ((e->type & 0xF0) == 0x80 || ((e->type & 0xF0) == 0x90 && e->p2 == 0)) emit keystateupdated(ch, e->p1, false); if ((e->type & 0xF0) == 0x90 && e->p2 > 0) |