Fix crash in RoomTreeModel

This commit is contained in:
Carl Schwan
2024-02-20 12:33:36 +01:00
committed by Tobias Fella
parent b546554fef
commit 7d26f3351f

View File

@@ -231,7 +231,7 @@ QHash<int, QByteArray> RoomTreeModel::roleNames() const
// TODO room type changes // TODO room type changes
QVariant RoomTreeModel::data(const QModelIndex &index, int role) const QVariant RoomTreeModel::data(const QModelIndex &index, int role) const
{ {
if (!index.isValid()) { if (!checkIndex(index, QAbstractItemModel::CheckIndexOption::IndexIsValid)) {
return QVariant(); return QVariant();
} }