diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-10-04 06:04:31 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-10-04 06:04:31 (GMT) |
commit | da45259dbfa05c4f3b6c8c0472a65851692060e4 (patch) | |
tree | 2ca4b812668dc9cf0d29e1ac53828527b231a3bb /src/declarative/graphicsitems/qdeclarativelistview.cpp | |
parent | 15cf932b3cc93239333694842be808acabae7bb3 (diff) | |
download | Qt-da45259dbfa05c4f3b6c8c0472a65851692060e4.zip Qt-da45259dbfa05c4f3b6c8c0472a65851692060e4.tar.gz Qt-da45259dbfa05c4f3b6c8c0472a65851692060e4.tar.bz2 |
Avoid potential null dereference.
Task-number: QT-4030
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-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 c1e6aaa..6b46bc5 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3090,7 +3090,7 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count) while (moved.count()) { int idx = moved.begin().key(); FxListItem *item = moved.take(idx); - if (item->item == d->currentItem->item) + if (d->currentItem && item->item == d->currentItem->item) item->setPosition(d->positionAt(idx)); d->releaseItem(item); } |