summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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;
+ }
}
/*!