calendarui/controller/src/calencontextfwlistener.cpp
branchRCL_3
changeset 13 0f07cd1b5772
parent 5 42814f902fe6
child 67 1539a383d7b6
--- a/calendarui/controller/src/calencontextfwlistener.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calencontextfwlistener.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -216,13 +216,16 @@
     {
     TRACE_ENTRY_POINT;
     CCFContextObject* co = CCFContextObject::NewLC( aSource, aType, aValue );
-
-    const TInt err = iCFClient->PublishContext( *co );
-    CleanupStack::PopAndDestroy( co );
+    if(iCFClient)
+      {
+        const TInt err = iCFClient->PublishContext( *co );
+        
 #ifdef _DEBUG
     RDebug::Print( _L("### PublishContext - err: %d"), err );
 #endif
     User::LeaveIfError( err );
+      }
+    CleanupStack::PopAndDestroy( co );
     TRACE_EXIT_POINT;
     }