Skip to content

Commit 1ad6860

Browse files
authored
Merge branch 'shadps4-emu:main' into mainBB
2 parents 141af80 + 43bf4ed commit 1ad6860

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/libraries/videoout/video_out.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@ s32 PS4_SYSV_ABI sceVideoOutGetVblankStatus(int handle, SceVideoOutVblankStatus*
282282

283283
s32 PS4_SYSV_ABI sceVideoOutGetResolutionStatus(s32 handle, SceVideoOutResolutionStatus* status) {
284284
LOG_INFO(Lib_VideoOut, "called");
285-
*status = driver->GetPort(handle)->resolution;
285+
auto* port = driver->GetPort(handle);
286+
if (!port || !port->is_open) {
287+
return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE;
288+
}
289+
290+
*status = port->resolution;
286291
return ORBIS_OK;
287292
}
288293

0 commit comments

Comments
 (0)