loleaflet/src/control/Control.LokDialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 3e4a78ccc3410b16fe6b34eea23720f551f53383 Author: Pranav Kant <[email protected]> Date: Thu Jan 25 20:02:32 2018 +0530 loleaflet: Don't try to paint if floating window has vanished Change-Id: I9284c7ec73f6f0e900d3efa2d055eb8b7d5303b2 Reviewed-on: https://gerrit.libreoffice.org/48620 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jan Holesovsky <[email protected]> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 95cb64d8..eac2baf0 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -297,7 +297,10 @@ L.Control.LokDialog = L.Control.extend({ _paintDialogChild: function(dialogId, width, height, rectangle, imgData) { var strDlgId = this._toDlgPrefix(dialogId); var img = new Image(); - var canvas = document.getElementById(strDlgId + '-floating'); + var canvas = L.DomUtil.get(strDlgId + '-floating'); + if (!canvas) + return; // no floating window to paint to + canvas.width = width; canvas.height = height; var ctx = canvas.getContext('2d'); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
