Trophy fix (#2975)

* fixed invalid handle destroy

* removed log
This commit is contained in:
georgemoralis 2025-05-22 15:35:00 +03:00 committed by GitHub
parent 3f949d2b6c
commit b55c3f4555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -206,6 +206,10 @@ s32 PS4_SYSV_ABI sceNpTrophyDestroyHandle(OrbisNpTrophyHandle handle) {
if (handle == ORBIS_NP_TROPHY_INVALID_HANDLE)
return ORBIS_NP_TROPHY_ERROR_INVALID_HANDLE;
if (handle >= trophy_handles.size()) {
LOG_ERROR(Lib_NpTrophy, "Invalid handle {}", handle);
return ORBIS_NP_TROPHY_ERROR_INVALID_HANDLE;
}
if (!trophy_handles.is_allocated({static_cast<u32>(handle)})) {
return ORBIS_NP_TROPHY_ERROR_INVALID_HANDLE;
}