Fix crash in RoomTreeModel
This commit is contained in:
committed by
Tobias Fella
parent
b546554fef
commit
7d26f3351f
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user