diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 0edfaf4..c5764a7 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -430,7 +430,7 @@ QVariant QSqlRelationalTableModel::data(const QModelIndex &index, int role) cons { Q_D(const QSqlRelationalTableModel); - if (role == Qt::DisplayRole && index.column() > 0 && index.column() < d->relations.count() && + if (role == Qt::DisplayRole && index.column() >= 0 && index.column() < d->relations.count() && d->relations.value(index.column()).isValid()) { QRelation &relation = d->relations[index.column()]; if (!relation.isDictionaryInitialized()) |