loleaflet/src/map/Map.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit dca0a126f343f19f2c1fc0bb601c9108d7bf2c30
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jan 30 17:04:15 2019 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Jan 30 17:06:24 2019 +0100

    Check if annotation exists before use
    
    Change-Id: I79204a8baeaa7b2896b153475cde2ba873b28738

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index a2c710eb5..fe40b2dd8 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -273,7 +273,8 @@ L.Map = L.Evented.extend({
                        for (var idxAnno in this._docLayer._annotations._items) 
{
                                var annotation = 
this._docLayer._annotations._items[idxAnno];
                                var username = annotation._data.author;
-                               annotation._data.avatar = 
this._viewInfoByUserName[username].userextrainfo.avatar;
+                               if (this._viewInfoByUserName[username])
+                                       annotation._data.avatar = 
this._viewInfoByUserName[username].userextrainfo.avatar;
                                annotation._updateContent();
                        }
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to