summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-10-04 06:04:31 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-10-04 06:04:31 (GMT)
commitda45259dbfa05c4f3b6c8c0472a65851692060e4 (patch)
tree2ca4b812668dc9cf0d29e1ac53828527b231a3bb /src/declarative/graphicsitems/qdeclarativelistview.cpp
parent15cf932b3cc93239333694842be808acabae7bb3 (diff)
downloadQt-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.cpp2
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);
}