Use proper index validity checking

This commit is contained in:
Martin Klapetek 2013-11-27 00:22:57 +01:00
parent cb4d7e8b4c
commit 6eea4da70d

View File

@ -61,7 +61,7 @@ int DaysModel::rowCount(const QModelIndex &parent) const
QVariant DaysModel::data(const QModelIndex &index, int role) const
{
if(index.row() >= 0 && role > Qt::UserRole) {
if (index.isValid()) {
DayData currentData = m_data->at(index.row());