Folks: better check for NULL persona

While it is likely that there is a GError when adding a persona fails,
better check for it explicitly. The code would crash with a NULL
persona pointer.
This commit is contained in:
Patrick Ohly 2012-11-29 17:05:55 +01:00
parent 37ed37fd08
commit 437abf1606

View file

@ -874,7 +874,7 @@ void IndividualAggregator::addContactDone(const GError *gerror,
{
try {
// Handle result of folks_persona_store_add_persona_from_details().
if (!gerror) {
if (!persona || gerror) {
GErrorCXX::throwError("add contact", gerror);
}