wsd/DocumentBroker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 95ff7ba2d735e28321027935228594f3d40f718a Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Tue Jan 3 15:47:31 2017 -0500 wsd: don't access erased iterator Change-Id: I7d9c85b11cd0ea96700c7302c23b5d4b30ce9fa2 Reviewed-on: https://gerrit.libreoffice.org/32710 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 53ead02..232b109 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -657,6 +657,7 @@ size_t DocumentBroker::removeSession(const std::string& id) auto it = _sessions.find(id); if (it != _sessions.end()) { + const auto readonly = (it->second ? it->second->isReadOnly() : false); _sessions.erase(it); // Let the child know the client has disconnected. @@ -664,7 +665,7 @@ size_t DocumentBroker::removeSession(const std::string& id) _childProcess->sendTextFrame(msg); const auto count = _sessions.size(); - LOG_TRC("Removed " << (it->second->isReadOnly() ? "readonly" : "non-readonly") << + LOG_TRC("Removed " << (readonly ? "readonly" : "non-readonly") << " session [" << id << "] from docKey [" << _docKey << "] to have " << count << " sessions."); return count; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits