From 2ea4aec304eefa10a554e40c5f9ea948d18617a7 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 27 Jul 2009 17:07:43 +1000 Subject: Don't crash in Horizontal orientation. --- src/declarative/fx/qfxlistview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index db80967..f300d1e 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -808,9 +808,11 @@ void QFxListViewPrivate::fixupX() if (orient == Qt::Vertical) return; if (currItemMode == QFxListView::SnapAuto) { - moveReason = Mouse; - _tl.clear(); - _tl.move(_moveX, -(currentItem->position() - snapPos), QEasingCurve(QEasingCurve::InOutQuad), 200); + if (currentItem) { + moveReason = Mouse; + _tl.clear(); + _tl.move(_moveX, -(currentItem->position() - snapPos), QEasingCurve(QEasingCurve::InOutQuad), 200); + } } else if (currItemMode == QFxListView::Snap) { moveReason = Mouse; int idx = snapIndex(); -- cgit v0.12