From ebbd6ad12257e727ca49c0f423314c02f9746820 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Sat, 8 Oct 2016 22:26:30 -0400
Subject: [PATCH] fix #83 again: GUI Freeze with hslider, vslider and vu

---
 pd/nw/pdgui.js | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index ca21dce7a..ba198ad69 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -3733,11 +3733,14 @@ function gui_gatom_dialog(did, attr_array) {
 }
 
 function gui_gatom_activate(cid, tag, state) {
-    var g = get_gobj(cid, tag);
-    if (state !== 0) {
-        g.classList.add("activated");
-    } else {
-        g.classList.remove("activated");
+    var g;
+    if (patchwin[cid]) {
+        g = get_gobj(cid, tag);
+        if (state !== 0) {
+            g.classList.add("activated");
+        } else {
+            g.classList.remove("activated");
+        }
     }
 }
 
-- 
GitLab