From c00236fc69bd208c793d6a23ffdf5a14b8f99620 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 18 Jul 2026 14:13:36 +0545 Subject: [PATCH] fix(dock): remove pointless del svg_w, add warning on trash SVG failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The del was a no-op (GC handles scope exit). The bare except Exception hid real rendering errors — now logs at warning level. --- src/window/dock/canvas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window/dock/canvas.py b/src/window/dock/canvas.py index 08e7b75..9cfa186 100644 --- a/src/window/dock/canvas.py +++ b/src/window/dock/canvas.py @@ -356,8 +356,8 @@ class DockCanvas(Gtk.DrawingArea): self._trash_pixbuf = Gdk.pixbuf_get_from_surface( surface, 0, 0, size, size ) - del svg_w - except Exception: + except Exception as e: + logger.warning(f"[canvas] Failed to render trash SVG: {e}") self._trash_pixbuf = self._get_pixbuf("user-trash", size) existing = self.model.get_by_id("trash")