mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
sceNpInit: fix error check order
This commit is contained in:
parent
780a234467
commit
e2a9c0a8f3
@ -416,18 +416,14 @@ error_code sceNpInit(u32 poolsize, vm::ptr<void> poolptr)
|
||||
return SCE_NP_ERROR_ALREADY_INITIALIZED;
|
||||
}
|
||||
|
||||
if (poolsize == 0)
|
||||
if (poolsize == 0 || !poolptr)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
else if (poolsize < SCE_NP_MIN_POOLSIZE)
|
||||
{
|
||||
return SCE_NP_ERROR_INSUFFICIENT_BUFFER;
|
||||
}
|
||||
|
||||
if (!poolptr)
|
||||
if (poolsize < SCE_NP_MIN_POOLSIZE)
|
||||
{
|
||||
return SCE_NP_ERROR_INVALID_ARGUMENT;
|
||||
return SCE_NP_ERROR_INSUFFICIENT_BUFFER;
|
||||
}
|
||||
|
||||
nph.init_NP(poolsize, poolptr);
|
||||
|
Loading…
Reference in New Issue
Block a user