Clear the psmfplayer handle on delete.

This commit is contained in:
Unknown W. Brackets 2014-05-24 14:13:18 -07:00
parent c651a0d1e9
commit 68bccebdeb

View File

@ -1373,20 +1373,15 @@ int scePsmfPlayerDelete(u32 psmfPlayer)
PsmfPlayer *psmfplayer = getPsmfPlayer(psmfPlayer);
if (!psmfplayer) {
ERROR_LOG(ME, "scePsmfPlayerDelete(%08x): invalid psmf player", psmfPlayer);
return ERROR_PSMF_NOT_FOUND;
}
bool isInitialized = isInitializedStatus(psmfplayer->status);
if (!isInitialized) {
ERROR_LOG(ME, "scePsmfPlayerDelete(%08x): not initialized", psmfPlayer);
return ERROR_PSMFPLAYER_INVALID_STATUS;
}
INFO_LOG(ME, "scePsmfPlayerDelete(%08x)", psmfPlayer);
delete psmfplayer;
psmfPlayerMap.erase(psmfPlayer);
psmfPlayerMap.erase(Memory::Read_U32(psmfPlayer));
Memory::Write_U32(0, psmfPlayer);
return 0;
return hleDelayResult(0, "psmfplayer deleted", 20000);
}
int scePsmfPlayerUpdate(u32 psmfPlayer)