summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 8d08c99..8216ab7 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2591,7 +2591,7 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count)
while (moved.count()) {
int idx = moved.begin().key();
FxGridItem *item = moved.take(idx);
- if (item->item == d->currentItem->item)
+ if (d->currentItem && item->item == d->currentItem->item)
item->setPosition(d->colPosAt(idx), d->rowPosAt(idx));
d->releaseItem(item);
}
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);
}