mpx/playbackframework/playbackserver/src/mpxplaybackserversession.cpp
changeset 61 3b098142db83
parent 32 edd273b3192a
equal deleted inserted replaced
57:f4fd77a452f2 61:3b098142db83
   171             iSyncBuffer = NULL;
   171             iSyncBuffer = NULL;
   172             break;
   172             break;
   173             }
   173             }
   174         case EPbsGetAsyncBuffer:
   174         case EPbsGetAsyncBuffer:
   175             {
   175             {
       
   176             //In case of other application leaving, causing us to leave
       
   177             //we could have a task that does not get removed from the top of the queue
       
   178             //but the data for that task has been deleted.
       
   179             //When the task runs again, there will be no data causing a panic - leave if this occurs
       
   180             User::LeaveIfNull(iAsyncBuffer);                         
   176             aMessage.WriteL(0,iAsyncBuffer->Ptr(0));
   181             aMessage.WriteL(0,iAsyncBuffer->Ptr(0));
   177             delete iAsyncBuffer;
   182             delete iAsyncBuffer;
   178             iAsyncBuffer = NULL;
   183             iAsyncBuffer = NULL;       
   179             break;
   184             break;                            
   180             }
   185             }
   181         case EPbsInitFromCollection:
   186         case EPbsInitFromCollection:
   182             {
   187             {
   183             MPXUser::CreateBufferL(aMessage, 0, iSyncBuffer);
   188             MPXUser::CreateBufferL(aMessage, 0, iSyncBuffer);
   184             CMPXCollectionPlaylist* p = NULL;
   189             CMPXCollectionPlaylist* p = NULL;