diff --git a/src/models/roomtreemodel.cpp b/src/models/roomtreemodel.cpp index 65c539a00..f88e244d5 100644 --- a/src/models/roomtreemodel.cpp +++ b/src/models/roomtreemodel.cpp @@ -231,7 +231,7 @@ QHash RoomTreeModel::roleNames() const // TODO room type changes QVariant RoomTreeModel::data(const QModelIndex &index, int role) const { - if (!index.isValid()) { + if (!checkIndex(index, QAbstractItemModel::CheckIndexOption::IndexIsValid)) { return QVariant(); }