Add null-check before access.
[citadel.git] / webcit / static / wclib.js
index 1594632f06bf3c6d312c901e74aa8f073be420d5..ae7d20c8af1a3cc2eba3df82f3299676407c41d5 100644 (file)
@@ -198,7 +198,8 @@ function remove_something(what_to_search, new_visibility) {
        else {
                document.poppedLayer = eval('document.layers[\'`' + what_to_search + '\']');
        }
-    document.poppedLayer.innerHTML = "";
+    if (document.poppedLayer!= null)
+       document.poppedLayer.innerHTML = "";
 }
 
 function unhide_imsg_popup() {