From 5353532fa210cdfee30d71b58149f0e7cf9dc572 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 22 Jan 2020 06:58:21 +0100 Subject: [PATCH] Core: Handle editor event only for real items Rows which do not fill an entire row are treated as if they contained empty placeholder items. Do not try to handle these as the item data for these will be a nullptr. Change-Id: Ia9420aeafe3e2a0a3f7d29208ad21c81e52ac81a Reviewed-by: Eike Ziller --- src/plugins/coreplugin/welcomepagehelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index 79d08dc172e..e705d5406f6 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -592,7 +592,8 @@ bool ListItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, { if (event->type() == QEvent::MouseButtonRelease) { const ListItem *item = index.data(ListModel::ItemRole).value(); - QTC_ASSERT(item, return false); + if (!item) + return false; auto mev = static_cast(event); if (index.isValid()) { const QPoint pos = mev->pos();