mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-15 04:21:01 +00:00
sceNp: fix invalid ctx dereference
Fixes "Buzz! Quiz Player" Offline Gameplay
This commit is contained in:
parent
020fdcc781
commit
e212f16962
@ -107,7 +107,10 @@ s32 sceNpCommerce2DestroyCtx(u32 ctx_id)
|
||||
{
|
||||
sceNpCommerce2.warning("sceNpCommerce2DestroyCtx(ctx_id=%d)", ctx_id);
|
||||
|
||||
destroy_commerce2_context(ctx_id);
|
||||
if (!destroy_commerce2_context(ctx_id))
|
||||
{
|
||||
return SCE_NP_COMMERCE2_ERROR_CTX_NOT_FOUND; // TODO: verify
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -118,6 +121,11 @@ s32 sceNpCommerce2EmptyStoreCheckStart(u32 ctx_id, s32 store_check_type, vm::cpt
|
||||
|
||||
const auto ctx = get_commerce2_context(ctx_id);
|
||||
|
||||
if (!ctx)
|
||||
{
|
||||
return SCE_NP_COMMERCE2_ERROR_CTX_NOT_FOUND; // TODO: verify
|
||||
}
|
||||
|
||||
if (ctx->context_callback)
|
||||
{
|
||||
sysutil_register_cb([=](ppu_thread& cb_ppu) -> s32
|
||||
@ -149,6 +157,11 @@ s32 sceNpCommerce2CreateSessionStart(u32 ctx_id)
|
||||
|
||||
const auto ctx = get_commerce2_context(ctx_id);
|
||||
|
||||
if (!ctx)
|
||||
{
|
||||
return SCE_NP_COMMERCE2_ERROR_CTX_NOT_FOUND; // TODO: verify
|
||||
}
|
||||
|
||||
if (ctx->context_callback)
|
||||
{
|
||||
sysutil_register_cb([=](ppu_thread& cb_ppu) -> s32
|
||||
|
Loading…
x
Reference in New Issue
Block a user