mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-01-01 20:22:24 +03:00
screencopy: fix crash in invalid format reads
This commit is contained in:
parent
3ce19e67fe
commit
31963f823b
@ -379,6 +379,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec*
|
|||||||
const auto PFORMAT = get_gles2_format_from_drm(format);
|
const auto PFORMAT = get_gles2_format_from_drm(format);
|
||||||
if (!PFORMAT) {
|
if (!PFORMAT) {
|
||||||
Debug::log(ERR, "[screencopy] Cannot read pixels, unsupported format %x", PFORMAT);
|
Debug::log(ERR, "[screencopy] Cannot read pixels, unsupported format %x", PFORMAT);
|
||||||
|
wlr_output_rollback(PMONITOR->output);
|
||||||
pixman_region32_fini(&fakeDamage);
|
pixman_region32_fini(&fakeDamage);
|
||||||
wlr_buffer_end_data_ptr_access(frame->buffer);
|
wlr_buffer_end_data_ptr_access(frame->buffer);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user