aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpcustomizewindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-12-02 11:55:52 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-12-02 11:55:52 +0800
commit81c26b4dd3c3d11471bacfe7a4a83d2a8edac751 (patch)
tree6db653f625bf2765738f3a2169d3344e52626e7d /qmidiplayer-desktop/qmpcustomizewindow.cpp
parentc34daa26c67f4a879ff541775c099ddc19a1dec5 (diff)
downloadQMidiPlayer-81c26b4dd3c3d11471bacfe7a4a83d2a8edac751.tar.xz
No more creepy blank action buttons that cause crashes if clicked.
If a plugin has been removed and the toolbar is reconfigured afterwards, a blank button will appear in the toolbar, which will cause a crash when clicked.
Diffstat (limited to 'qmidiplayer-desktop/qmpcustomizewindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpcustomizewindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpcustomizewindow.cpp b/qmidiplayer-desktop/qmpcustomizewindow.cpp
index b7017b7..a2ff19c 100644
--- a/qmidiplayer-desktop/qmpcustomizewindow.cpp
+++ b/qmidiplayer-desktop/qmpcustomizewindow.cpp
@@ -44,6 +44,7 @@ void qmpCustomizeWindow::launch(int w)
std::set<std::string> s;
for(auto i=v.begin();i!=v.end();++i)
{
+ if(m.find(*i)==m.end())continue;
s.insert(*i);
QListWidgetItem* it=new QListWidgetItem(
m[*i].icon(),