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:
Marco Allegretti 2026-05-04 08:43:15 +02:00
parent e72165ec98
commit 378e4830ac

View file

@ -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;
}