From 9e144490bfa059050f8b90645db80b1fd45fd2b1 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 17 Aug 2009 15:08:14 +0200 Subject: Fix a crash in the destruction of QListView --- src/gui/itemviews/qlistview.cpp | 6 ++++-- 1 file 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() -- cgit v0.12