summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index 336c856..3bca573 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -606,7 +606,8 @@ Qt::DropActions BookmarkModel::supportedDropActions() const
Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
{
Qt::ItemFlags defaultFlags = QStandardItemModel::flags(index);
- if (index.data(Qt::UserRole + 10).toString() == QLatin1String("Folder"))
+ if ((!index.isValid()) // can only happen for the invisible root item
+ || index.data(Qt::UserRole + 10).toString() == QLatin1String("Folder"))
return (Qt::ItemIsDropEnabled | defaultFlags) &~ Qt::ItemIsDragEnabled;
return (Qt::ItemIsDragEnabled | defaultFlags) &~ Qt::ItemIsDropEnabled;