From fe9f2972b4602a0c7c69d43828dd68ee738c85ae Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe.dumez@intel.com>
Date: Sat, 7 May 2011 13:29:15 +0300
Subject: [PATCH 1/6] QContactEBook::removeContact() eContact pointer check

Check if the returned eContact pointer is NULL before trying
to remove it. This happens when the client tries to remove a
contact which does not exist.
---
 src/qcontactebook.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/qcontactebook.cpp b/src/qcontactebook.cpp
index 228c8cd..b8c6766 100644
--- a/src/qcontactebook.cpp
+++ b/src/qcontactebook.cpp
@@ -578,6 +578,8 @@ bool QContactEBook::removeContact(const QContactLocalId& contactId, QContactMana
   bool ok = false;
 
   EContact *eContact = getEContact(contactId, error);
+  if (!eContact)
+    return false;
 
   // ASync => Sync
   QEventLoop loop;
-- 
1.7.4.4

