telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp
changeset 23 6b1d113cdff3
parent 20 244d7c5f118e
child 24 6638e7f4bd8f
child 42 3adadc800673
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp	Fri Apr 16 16:12:37 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmussdtsy.cpp	Mon May 03 13:37:20 2010 +0300
@@ -880,13 +880,37 @@
 				{
 				RMobileUssdMessaging::TMobileUssdAttributesV1* tempReturnNotifyUssdMessageAttributesPtr;
 				aDataPackage->UnPackData ( &tempReturnNotifyPtr, &tempReturnNotifyUssdMessageAttributesPtr );
-				*iReturnNotifyPtr = *tempReturnNotifyPtr;
-				*iReturnNotifyUssdMessageAttributesPtr = *tempReturnNotifyUssdMessageAttributesPtr;
+				if (tempReturnNotifyPtr != NULL)
+				    {
+				    *iReturnNotifyPtr = *tempReturnNotifyPtr;
+				    }
+				else
+				    {
+                    iReturnNotifyPtr->iOpCode = KErrNone;
+                    iReturnNotifyPtr->iAdditionalInfo.Append( KErrNone );
+				    }
+				if (tempReturnNotifyUssdMessageAttributesPtr != NULL)
+					{
+					*iReturnNotifyUssdMessageAttributesPtr = *tempReturnNotifyUssdMessageAttributesPtr;
+					}
+				else
+				    {
+                    iReturnNotifyUssdMessageAttributesPtr->iFormat = RMobileUssdMessaging::EFormatUnspecified;
+                    iReturnNotifyUssdMessageAttributesPtr->iType = RMobileUssdMessaging::EUssdUnknown;
+				    }
 				}
             else
 				{
 				aDataPackage->UnPackData ( &tempReturnNotifyPtr );
-				*iReturnNotifyPtr = *tempReturnNotifyPtr;
+				if(tempReturnNotifyPtr != NULL)
+				    {
+                    *iReturnNotifyPtr = *tempReturnNotifyPtr;
+				    }
+				else
+				    {
+                    iReturnNotifyPtr->iOpCode = KErrNone;
+                    iReturnNotifyPtr->iAdditionalInfo.Append( KErrNone );
+				    }
 				}
             }
          // Null ret pointers