From f2102e1f829d216591a5f49819847c05383305ae Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 10 Jun 2013 13:20:17 -0500 Subject: Fix incorrect thread termination handling when thread count is greater than two This resolves Bug 1521 Make double free or delete of QString objects more obvious --- src/widgets/qlistview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/qlistview.cpp') diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index 6f8ec29..6e2564c 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -5181,11 +5181,13 @@ void QListView::keyPressEvent( QKeyEvent * e ) QListViewItem * QListView::itemAt( const QPoint & viewPos ) const { - if ( viewPos.x() > contentsWidth() - contentsX() ) + if ( viewPos.x() > contentsWidth() - contentsX() ) { return 0; + } - if ( !d->drawables || d->drawables->isEmpty() ) + if ( !d->drawables || d->drawables->isEmpty() ) { buildDrawableList(); + } QListViewPrivate::DrawableItem * c = d->drawables->first(); int g = viewPos.y() + contentsY(); -- cgit v1.2.1