summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-06 08:34:31 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-06 08:42:56 (GMT)
commit4511c0b35517707542a3f32f82125c9d33a6000b (patch)
tree45b72a1d6314bf13812a33ca6e2f088bac58cfa4
parent68ad89d69e03731a2a5f7c6c8623b62cc1098e79 (diff)
downloadQt-4511c0b35517707542a3f32f82125c9d33a6000b.zip
Qt-4511c0b35517707542a3f32f82125c9d33a6000b.tar.gz
Qt-4511c0b35517707542a3f32f82125c9d33a6000b.tar.bz2
Fixed crash in tst_qitemview.
QAbstractItemViewPrivate::selectionModel may be null. Reviewed-by: olivier
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index ed2b3c5..d929590 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -960,7 +960,8 @@ void QAbstractItemView::reset()
d->currentIndexSet = false;
setState(NoState);
setRootIndex(QModelIndex());
- d->selectionModel->reset();
+ if (d->selectionModel)
+ d->selectionModel->reset();
}
/*!