diff --git a/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/menus.js b/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/menus.js index 607b9cbd32..490ad6c77e 100644 --- a/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/menus.js +++ b/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/menus.js @@ -462,6 +462,9 @@ class WindowThumbnail { this.destroyOverlayPreview(); }, thumbnailCloseButtonOffset: ({thumbnailCloseButtonOffset}) => { + // This fires for every registered thumbnail, including ones whose + // button has not been created yet or has already been destroyed. + if (!this.button) return; this.button.style = CLOSED_BUTTON_STYLE + `position: ${thumbnailCloseButtonOffset}px -2px;`; } });