From 74822bfbd44e0147c801c35978a3a31aae231d69 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Mon, 24 Apr 2017 21:43:26 -0400 Subject: [PATCH] another attempt to fix #312: protect against out-of-order message border redraws --- pd/nw/pdgui.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 4f71c0b14..a5c38a5fd 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -1955,11 +1955,14 @@ function gui_message_flash(cid, tag, state) { } function gui_message_redraw_border(cid, tag, width, height) { - var g = get_gobj(cid, tag), + var g, b; + if (patchwin[cid]) { + g = get_gobj(cid, tag); b = g.querySelector(".border"); - configure_item(b, { - points: message_border_points(width, height), - }); + configure_item(b, { + points: message_border_points(width, height), + }); + } } function atom_border_points(width, height, is_dropdown) { -- GitLab