Fix a bug in policy
diff --git a/src/contact-item.cpp b/src/contact-item.cpp
index 9ce1b66..60e9a93 100644
--- a/src/contact-item.cpp
+++ b/src/contact-item.cpp
@@ -37,7 +37,10 @@
m_name = string(nameBlob->buf(), nameBlob->size());
m_alias = alias.empty() ? m_name : alias;
Ptr<const Blob> institutionBlob = profileData->getProfile().getProfileEntry("institution");
- m_institution = string(institutionBlob->buf(), institutionBlob->size());
+ if(institutionBlob != NULL)
+ m_institution = string(institutionBlob->buf(), institutionBlob->size());
+ else
+ m_institution = string();
}
ContactItem::ContactItem(const ContactItem& contactItem)