mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
sceNpInit: fix error check order
This commit is contained in:
parent
780a234467
commit
e2a9c0a8f3
1 changed files with 3 additions and 7 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue