summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-08-03 15:56:00 -0500
committerTimothy Pearson <[email protected]>2013-08-03 15:56:00 -0500
commitd2ab408c068de5c4841e3a7d5fb4dce2e1a66ea9 (patch)
tree4d5b35a6559a2be146dad23b506d3667cfb42380 /src
parent32bd03533db933819ecd973a514160f9bb818df9 (diff)
downloadqt3-d2ab408c068de5c4841e3a7d5fb4dce2e1a66ea9.tar.gz
qt3-d2ab408c068de5c4841e3a7d5fb4dce2e1a66ea9.zip
Do not return deleted icon view items after icon view deletion
This resolves Bug 1605
Diffstat (limited to 'src')
-rw-r--r--src/iconview/qiconview.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp
index 2272f83..a92ed46 100644
--- a/src/iconview/qiconview.cpp
+++ b/src/iconview/qiconview.cpp
@@ -2964,6 +2964,7 @@ QIconView::~QIconView()
d->toolTip = 0;
#endif
delete d;
+ d = NULL;
}
/*!
@@ -3227,7 +3228,12 @@ int QIconView::index( const QIconViewItem *item ) const
QIconViewItem *QIconView::firstItem() const
{
- return d->firstItem;
+ if (d) {
+ return d->firstItem;
+ }
+ else {
+ return NULL;
+ }
}
/*!
@@ -3239,7 +3245,12 @@ QIconViewItem *QIconView::firstItem() const
QIconViewItem *QIconView::lastItem() const
{
- return d->lastItem;
+ if (d) {
+ return d->lastItem;
+ }
+ else {
+ return NULL;
+ }
}
/*!
@@ -3251,7 +3262,12 @@ QIconViewItem *QIconView::lastItem() const
QIconViewItem *QIconView::currentItem() const
{
- return d->currentItem;
+ if (d) {
+ return d->currentItem;
+ }
+ else {
+ return NULL;
+ }
}
/*!