loleaflet/src/control/Control.LokDialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit cb6c9461e08717216ba33398e1e28b0be6b54838 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]> (cherry picked from commit 3e4a78ccc3410b16fe6b34eea23720f551f53383) Reviewed-on: https://gerrit.libreoffice.org/48814 Reviewed-by: pranavk <[email protected]> Tested-by: pranavk <[email protected]> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index c2b57c2e..308819a6 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -305,7 +305,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
