summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-17 13:08:14 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-17 13:08:14 (GMT)
commit9e144490bfa059050f8b90645db80b1fd45fd2b1 (patch)
tree19939ef56400814deb0dd78775376467d06dda8c /src
parent6687a82476a96922f23d4fd3535d4e7354d9cdab (diff)
downloadQt-9e144490bfa059050f8b90645db80b1fd45fd2b1.zip
Qt-9e144490bfa059050f8b90645db80b1fd45fd2b1.tar.gz
Qt-9e144490bfa059050f8b90645db80b1fd45fd2b1.tar.bz2
Fix a crash in the destruction of QListView
Diffstat (limited to 'src')
-rw-r--r--src/gui/itemviews/qlistview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 3ab3204..b055d32 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -1974,8 +1974,10 @@ QListViewPrivate::QListViewPrivate()
QListViewPrivate::~QListViewPrivate()
{
- delete staticListView;
- delete dynamicListView;
+ if (viewMode == QListView::ListMode)
+ delete staticListView;
+ else
+ delete dynamicListView;
}
void QListViewPrivate::clear()