summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/ablabel.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 5b40dc1..937aaae 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -51,7 +51,12 @@ void AbLabel::setContacts( const OContactAccess::List& viewList )
int AbLabel::currentEntry_UID()
{
- return ( (*m_itCurContact).uid() );
+ OContact contact = *m_itCurContact;
+
+ if ( contact.isEmpty() )
+ return 0;
+ else
+ return ( contact.uid() );
}
OContact AbLabel::currentEntry()