mmsengine/mmspushhandler/src/CMmsPushHandler.cpp
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 47 5b14749788d7
child 79 2981cb3aa489
--- a/mmsengine/mmspushhandler/src/CMmsPushHandler.cpp	Fri Apr 16 14:56:15 2010 +0300
+++ b/mmsengine/mmspushhandler/src/CMmsPushHandler.cpp	Mon May 03 12:29:07 2010 +0300
@@ -172,14 +172,16 @@
     // If memory runs out, tough luck..
     //
     TPtrC8 messageBodyPtr;
-    iPushMsg->GetMessageBody( messageBodyPtr );
-    iBody = messageBodyPtr.Alloc();
-    if ( !iBody )
+    if ( iPushMsg->GetMessageBody( messageBodyPtr ) )
         {
-        LOGTEXT( _L("HandleMessageL(): Out of memory when allocating body buffer") );
-        // Commit suicide - the caller expects it even if we leave
-        iPluginKiller->KillPushPlugin();
-        User::Leave( KErrNoMemory );
+        iBody = messageBodyPtr.Alloc();
+        if ( !iBody )
+            {
+        	LOGTEXT( _L("HandleMessageL(): Out of memory when allocating body buffer") );
+        	// Commit suicide - the caller expects it even if we leave
+        	iPluginKiller->KillPushPlugin();
+        	User::Leave( KErrNoMemory );
+            }
         }
     
     //