summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views/contactlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/views/contactlistview.cpp')
-rw-r--r--kaddressbook/views/contactlistview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 1deadc190..90941ff56 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -216,7 +216,12 @@ ContactListView *ContactListViewItem::parent()
void ContactListViewItem::refresh()
{
- // Update our addressee, since it may have changed else were
+ // Avoid crash on exit
+ if ( !mDocument ) {
+ return;
+ }
+
+ // Update our addressee, since it may have changed elsewhere
mAddressee = mDocument->findByUid(mAddressee.uid());
if (mAddressee.isEmpty())
return;