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 <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 3e4a78ccc3410b16fe6b34eea23720f551f53383) Reviewed-on: https://gerrit.libreoffice.org/48814 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
This commit is contained in:
parent
1a4c8f8dd3
commit
cb6c9461e0
1 changed files with 4 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue