summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-04-01 14:44:59 +0100
committerAndras Timar <andras.timar@collabora.com>2020-04-02 10:09:09 +0200
commit678603049465851e09c189014960553b4476618e (patch)
treece64e35ff80f4fb236d0da13e4e86e13fc65b9a8
parent8228a56544160f34d876aa4d4b1a56691226bd9a (diff)
Avoid de-referencing non-existing marker.
This screws up cursors across views in some circumstances, when there is no marker in one of the views. Regression from 3b0478baab1e58a45fc723e9265942bf5d4c10fa Change-Id: Ia1294d83801d656a919f97206b7b573a1b74b77f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91508 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/layer/tile/TileLayer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 17521d449..bfac945ab 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2253,7 +2253,8 @@ L.TileLayer = L.GridLayer.extend({
this._viewLayerGroup.removeLayer(viewCursorMarker);
}
- this._viewCursors[viewId].marker.showCursorHeader();
+ if (this._viewCursors[viewId].marker)
+ this._viewCursors[viewId].marker.showCursorHeader();
},
updateAllViewCursors : function() {