From 30c72b105e6091b6df398d99cf2bc1c98a9e080e Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 12 Aug 2019 07:56:58 +0300 Subject: [PATCH] Fix race on notifying vdec thread in cellVdecGetPicture Can dereference nullptr if cellVdecClose was called simultaneously. --- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index abf1be2e64..c46805c2aa 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -594,7 +594,7 @@ s32 cellVdecGetPicture(u32 handle, vm::cptr format, vm::ptr>(vdec->ppu_tid); - thread_ctrl::notify(*vdec_ppu); + if (vdec_ppu) thread_ctrl::notify(*vdec_ppu); } if (outBuff)