Make sure packet iterator is validate after DSStream_Packet_Clear() calls erase().

this fixs debug builds with PGR2
This commit is contained in:
jackchentwkh 2021-05-23 21:57:52 +08:00
parent ea55dfa45d
commit fa1f4d4c50
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,8 @@ bool DSStream_Packet_Process(
}
return 0;
}
//the iterator might be invalidated, so we update it again.
packetCurrent = pThis->Host_BufferPacketArray.begin();
#if 0 // Extend debug verification
EmuLog(LOG_LEVEL::DEBUG, "nextBuffer: %08X; packetCurrent->bufPlayed: %08X; bufPlayed: %08X;\n",
packetCurrent._Ptr,