summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/modeldelegates.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp
index 9ffbe605b..bdeaf9138 100644
--- a/desktop-widgets/modeldelegates.cpp
+++ b/desktop-widgets/modeldelegates.cpp
@@ -451,6 +451,8 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QFontMetrics fmBigger(fontBigger);
QStyleOptionViewItem opt = option;
const QAbstractProxyModel *proxyModel = dynamic_cast<const QAbstractProxyModel*>(origIdx.model());
+ if (!proxyModel)
+ return;
QModelIndex index = proxyModel->mapToSource(origIdx);
QStyledItemDelegate::initStyleOption(&opt, index);
QString diveSiteName = index.data().toString();