loolwsd: Do not unload without a successfull load
A load document operation may fail, for example, when user enters a wrong password or no password. In such cases ToPrisoner sends a disconnect to child. Child do not need to take any steps in this case, such as, decrementing the view counter, because nothing was loaded. Change-Id: Ib71f871aa1728c6355563362987800dece1679d3 Reviewed-on: https://gerrit.libreoffice.org/22203 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
cdcb32f013
commit
93fdcb34c4
1 changed files with 1 additions and 1 deletions
|
@ -558,7 +558,7 @@ private:
|
|||
|
||||
const unsigned intSessionId = Util::decodeId(sessionId);
|
||||
const auto it = _connections.find(intSessionId);
|
||||
if (it == _connections.end() || !it->second)
|
||||
if (it == _connections.end() || !it->second || !_loKitDocument)
|
||||
{
|
||||
// Nothing to do.
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue