commsfwutils/commsbufs/src/commsbufasyncrequest.cpp
branchRCL_3
changeset 29 9644881fedd0
parent 0 dfb7c4ff071f
--- a/commsfwutils/commsbufs/src/commsbufasyncrequest.cpp	Tue May 11 17:20:19 2010 +0300
+++ b/commsfwutils/commsbufs/src/commsbufasyncrequest.cpp	Tue May 25 14:00:39 2010 +0300
@@ -76,7 +76,8 @@
 @param  aAllocator      The handle to the allocator
 */
     {
-    iAsyncReqImpl->Alloc(aChain, aSize, aMinSize, aMaxSize, aStatus);
+    __ASSERT_ALWAYS(iAsyncReqImpl != NULL, CommsBuf::Panic(EMBuf_InvalidAsyncReqImpl));
+	iAsyncReqImpl->Alloc(aChain, aSize, aMinSize, aMaxSize, aStatus);
     }
 
 
@@ -85,7 +86,10 @@
 Cancel the asynchronous request
 */
 	{
-	iAsyncReqImpl->Cancel();
+	if (iAsyncReqImpl)
+		{
+		iAsyncReqImpl->Cancel();
+		}
 	}
 
 EXPORT_C void RCommsBufAsyncRequest::Complete(TInt aCode)
@@ -95,5 +99,6 @@
 @param	aCode	The request completion code
 */
 	{
+	__ASSERT_ALWAYS(iAsyncReqImpl != NULL, CommsBuf::Panic(EMBuf_InvalidAsyncReqImpl));
 	iAsyncReqImpl->Complete(aCode);
 	}