screencopy/toplevelexport: sanitize pointers in ::copyFrame
oopsie~~ >///<
This commit is contained in:
parent
ded174d6e5
commit
f085ed4454
4 changed files with 24 additions and 0 deletions
|
|
@ -224,6 +224,13 @@ void CToplevelExportProtocolManager::copyFrame(wl_client* client, wl_resource* r
|
|||
return;
|
||||
}
|
||||
|
||||
if (!g_pCompositor->windowValidMapped(PFRAME->pWindow)) {
|
||||
Debug::log(ERR, "Client requested sharing of window handle {:x} which is gone!", (uintptr_t)PFRAME->pWindow);
|
||||
hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource);
|
||||
removeFrame(PFRAME);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PFRAME->pWindow->m_bIsMapped || PFRAME->pWindow->isHidden()) {
|
||||
Debug::log(ERR, "Client requested sharing of window handle {:x} which is not shareable (2)!", PFRAME->pWindow);
|
||||
hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue