diff options
| author | ssareta <ssareta@protonmail.com> | 2026-03-20 10:04:52 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-19 21:04:52 +0000 |
| commit | b940b0d2c197841b0f648598ee782dbaf9e0a89b (patch) | |
| tree | 60aaae9ae2314b1c20ccb6a0531dfd62a5200507 /src/protocols/ToplevelExport.cpp | |
| parent | 3b902a47fe0126c9e0fb7fbe2e47b7c1db6b39cf (diff) | |
screencopy: fix crash in screensharing toplevel with invalid handle (#13781)
Diffstat (limited to 'src/protocols/ToplevelExport.cpp')
| -rw-r--r-- | src/protocols/ToplevelExport.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index d7ba7519..7b3d0c89 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -26,6 +26,11 @@ CToplevelExportClient::CToplevelExportClient(SP<CHyprlandToplevelExportManagerV1 } void CToplevelExportClient::captureToplevel(uint32_t frame, int32_t overlayCursor_, PHLWINDOW handle) { + if UNLIKELY (!handle) { + LOGM(Log::ERR, "Couldn't capture (window doesn't exist)"); + return; + } + auto session = Screenshare::mgr()->getManagedSession(m_resource->client(), handle); // create a frame |
