diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index bf30f3663a..f93abea0e6 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -416,18 +416,14 @@ error_code sceNpInit(u32 poolsize, vm::ptr 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);