diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index 16f09fd3307a6e1d59cd1628eb81c310293682ee..3fa54195a5a2dea477a46016721f1c02bc5ea9c7 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -2952,13 +2952,18 @@ function gui_vumeter_draw_peak(cid,tag,color,p1,p2,p3,p4,width,basex,basey) {
 
 // probably should change tag from "rect" to "cover"
 function gui_vumeter_update_rms(cid, tag, p1, p2, p3, p4, basex, basey) {
-    var rect = get_item(cid, tag + "rect");
-    configure_item(rect, {
-        x: p1 - basex,
-        y: p2 - basey,
-        width: p3 - p1,
-        height: p4 - p2 + 1
-    });
+    var rect;
+    if (patchwin[cid]) {
+        rect = get_item(cid, tag + "rect");
+        if (rect) {
+            configure_item(rect, {
+                x: p1 - basex,
+                y: p2 - basey,
+                width: p3 - p1,
+                height: p4 - p2 + 1
+            });
+        }
+    }
 }
 
 function gui_vumeter_update_peak(cid,tag,color,p1,p2,p3,p4,basex,basey) {