From 4a2c411dce4ef8c06bcc6d7e6b281a3c6ef13c2d Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Mon, 23 Oct 2023 11:37:49 +0300 Subject: [PATCH] fix error with already destroyed label --- src/taskbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/taskbar.js b/src/taskbar.js index 87b3cec..98e2110 100644 --- a/src/taskbar.js +++ b/src/taskbar.js @@ -82,7 +82,9 @@ class TaskBarItem extends St.Bin { this.label.hide() Main.layoutManager.addChrome(this.label) - this.connect('destroy', () => this.label.destroy()) + + this.label.connect('destroy', () => this.label = null) + this.connect('destroy', () => this.label?.destroy()) this.side = St.Side.BOTTOM }