mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 10:29:50 +01:00
screencopy: fix crash in invalid format reads
This commit is contained in:
parent
3ce19e67fe
commit
31963f823b
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue