index is still invalid if its row equals the number of resolutions
[harmattan/cameraplus] / imports / imageresolutionmodel.cpp
index 47b16b0..4ba775e 100644 (file)
@@ -53,7 +53,7 @@ int ImageResolutionModel::rowCount(const QModelIndex& parent) const {
 }
 
 QVariant ImageResolutionModel::data(const QModelIndex& index, int role) const {
-  if (index.row() < 0 || index.row() > m_resolutions.size()) {
+  if (index.row() < 0 || index.row() >= m_resolutions.size()) {
     return QVariant();
   }