diff options
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 38b3c4d9ac..0177597c4a 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3578,7 +3578,8 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count) } // Ensure we don't cause an ugly list scroll. - d->visibleItems.first()->setPosition(d->visibleItems.first()->position() + moveBy); + if (!d->visibleItems.isEmpty()) + d->visibleItems.first()->setPosition(d->visibleItems.first()->position() + moveBy); d->updateSections(); d->layout(); |