diff -r 238255e8b033 -r 84d9eb65b26f mmsengine/mmspushhandler/src/CMmsPushHandler.cpp --- 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 ); + } } //