diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-11-29 17:05:55 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-12-03 17:14:48 +0100 |
commit | 437abf16069517a54a6e0c47e1fa299039b1d7b1 (patch) | |
tree | 1f61bf80a3c639ad616706128164156e4aedf5ae /src/dbus/server/pim/folks.cpp | |
parent | 37ed37fd0868f55ee0f91275ad0efedde3de1d7e (diff) |
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.
Diffstat (limited to 'src/dbus/server/pim/folks.cpp')
-rw-r--r-- | src/dbus/server/pim/folks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/server/pim/folks.cpp b/src/dbus/server/pim/folks.cpp index 9eb6dda6..393f2cfa 100644 --- a/src/dbus/server/pim/folks.cpp +++ b/src/dbus/server/pim/folks.cpp @@ -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); } |