[Libreoffice-commits] online.git: wsd/ClientSession.cpp
Jan Holesovsky
kendy at collabora.com
Thu Jun 14 15:01:20 UTC 2018
wsd/ClientSession.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit b65894b28777505c611156a11e6b6377a04ead91
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Apr 25 13:46:23 2018 +0200
Avoid crash in the non-wopi case.
Change-Id: I87aff462dab4abca0235622493f720eacbc39f03
Reviewed-on: https://gerrit.libreoffice.org/53448
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 70ee741fa..337221f1d 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -750,9 +750,9 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
if (unoStatePair.first == ".uno:TrackChanges")
{
if ((unoStatePair.second == "true" &&
- _wopiFileInfo->_disableChangeTrackingRecord == WopiStorage::WOPIFileInfo::TriState::True) ||
+ _wopiFileInfo && _wopiFileInfo->_disableChangeTrackingRecord == WopiStorage::WOPIFileInfo::TriState::True) ||
(unoStatePair.second == "false" &&
- _wopiFileInfo->_disableChangeTrackingRecord == WopiStorage::WOPIFileInfo::TriState::False))
+ _wopiFileInfo && _wopiFileInfo->_disableChangeTrackingRecord == WopiStorage::WOPIFileInfo::TriState::False))
{
// Toggle the TrackChanges state.
LOG_DBG("Forcing " << unoStatePair.first << " toggle per user settings.");
@@ -762,9 +762,9 @@ bool ClientSession::handleKitToClientMessage(const char* buffer, const int lengt
else if (unoStatePair.first == ".uno:ShowTrackedChanges")
{
if ((unoStatePair.second == "true" &&
- _wopiFileInfo->_disableChangeTrackingShow == WopiStorage::WOPIFileInfo::TriState::True) ||
+ _wopiFileInfo && _wopiFileInfo->_disableChangeTrackingShow == WopiStorage::WOPIFileInfo::TriState::True) ||
(unoStatePair.second == "false" &&
- _wopiFileInfo->_disableChangeTrackingShow == WopiStorage::WOPIFileInfo::TriState::False))
+ _wopiFileInfo && _wopiFileInfo->_disableChangeTrackingShow == WopiStorage::WOPIFileInfo::TriState::False))
{
// Toggle the ShowTrackChanges state.
LOG_DBG("Forcing " << unoStatePair.first << " toggle per user settings.");
More information about the Libreoffice-commits
mailing list