loleaflet/src/control/Control.LokDialog.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3503dc9a07932079f193ccdee929a2a5a6b818d0
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Fri Mar 15 12:53:45 2019 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Fri Mar 15 12:59:23 2019 +0200

    Guard against "TypeError: null is not an object"

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 9b5774fc6..b8b7d7ed3 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -620,7 +620,10 @@ L.Control.LokDialog = L.Control.extend({
        _onDialogChildClose: function(dialogId) {
                $('#' + this._toStrId(dialogId) + '-floating').remove();
                // remove any extra height allocated for the parent container
-               var canvasHeight = document.getElementById(dialogId + 
'-canvas').height;
+               var canvas = document.getElementById(dialogId + '-canvas');
+               if (!canvas)
+                       return;
+               var canvasHeight = canvas.height;
                $('#' + dialogId).height(canvasHeight + 'px');
        },
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to