diff -r f4fd77a452f2 -r 3b098142db83 mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp --- a/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Thu Sep 02 20:56:29 2010 +0300 +++ b/mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp Fri Sep 17 08:33:08 2010 +0300 @@ -173,10 +173,15 @@ } case EPbsGetAsyncBuffer: { + //In case of other application leaving, causing us to leave + //we could have a task that does not get removed from the top of the queue + //but the data for that task has been deleted. + //When the task runs again, there will be no data causing a panic - leave if this occurs + User::LeaveIfNull(iAsyncBuffer); aMessage.WriteL(0,iAsyncBuffer->Ptr(0)); delete iAsyncBuffer; - iAsyncBuffer = NULL; - break; + iAsyncBuffer = NULL; + break; } case EPbsInitFromCollection: {