From 92de848036b0112bc93d08ff7ed33e5b68b1c2e7 Mon Sep 17 00:00:00 2001 From: purvansh2003-creator Date: Sun, 12 Jul 2026 18:43:24 +0530 Subject: [PATCH] Fix crash when monitor is disconnected during dock animation this.dash is nulled by destroyDash() when a monitor is removed, but an in-flight animate() call (recursive via the fast-forward loop, or re-entered mid-tick from the animation timer) can still be executing and throws: TypeError: can't access property 'opacity', this.dash is null This disables the extension until it is manually re-enabled or the shell is restarted. Add a guard at the top of animate() and inside the fast-forward loop so it exits cleanly instead of crashing once this.dash has been torn down. --- dock.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dock.js b/dock.js index d3202ad..de6620c 100644 --- a/dock.js +++ b/dock.js @@ -1208,6 +1208,10 @@ export let Dock = GObject.registerClass( } animate(dt = 15) { + if(!this.dash) { + return; + } + if (this._preview) { let p = null; @@ -1236,6 +1240,11 @@ export let Dock = GObject.registerClass( if (!this._pauseBounce || this._pauseBounce <= 0) { while (this._fast_forward && this._fast_forward-- > 0) { this.animate(dt); + + if(!this.dash){ + break; + } + this.dash.opacity = 0; } }