diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 82b3e1c..e1dd1c0 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1021,7 +1021,7 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex) if (oldCurrentItem && (!currentItem || oldCurrentItem->item != currentItem->item)) oldCurrentItem->attached->setIsCurrentItem(false); if (currentItem) { - if (modelIndex == visibleIndex - 1) { + if (modelIndex == visibleIndex - 1 && visibleItems.count()) { // We can calculate exact postion in this case currentItem->setPosition(visibleItems.first()->position() - currentItem->size() - spacing); } else { |