summaryrefslogtreecommitdiff
path: root/src/pluginflagicondelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluginflagicondelegate.cpp')
-rw-r--r--src/pluginflagicondelegate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pluginflagicondelegate.cpp b/src/pluginflagicondelegate.cpp
index 6c0bb29e..761555d7 100644
--- a/src/pluginflagicondelegate.cpp
+++ b/src/pluginflagicondelegate.cpp
@@ -11,8 +11,10 @@ PluginFlagIconDelegate::PluginFlagIconDelegate(QObject *parent)
QList<QIcon> PluginFlagIconDelegate::getIcons(const QModelIndex &index) const
{
QList<QIcon> result;
- foreach (const QVariant &var, index.data(Qt::UserRole + 1).toList()) {
- result.append(var.value<QIcon>());
+ if (index.isValid()) {
+ foreach (const QVariant &var, index.data(Qt::UserRole + 1).toList()) {
+ result.append(var.value<QIcon>());
+ }
}
return result;
}