mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
Guard convergentwindows against invalid windows
Return early in run(window) when the window object is null, deleted, or non-normal before accessing resourceClass. This prevents runtime errors during window lifecycle races.
This commit is contained in:
parent
e72165ec98
commit
378e4830ac
1 changed files with 4 additions and 4 deletions
|
|
@ -53,13 +53,13 @@ Loader {
|
|||
}
|
||||
|
||||
function run(window) {
|
||||
// HACK: don't maximize xwaylandvideobridge
|
||||
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
||||
if (window.resourceClass === 'xwaylandvideobridge') {
|
||||
if (!window || window.deleted || !window.normalWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.normalWindow) {
|
||||
// HACK: don't maximize xwaylandvideobridge
|
||||
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
||||
if (window.resourceClass === 'xwaylandvideobridge') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue