[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/ClientSession.cpp

Jan Holesovsky kendy at collabora.com
Thu Apr 26 17:27:55 UTC 2018


 wsd/ClientSession.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1e536b80f31d978e35dd21577003c20a4d4ecb2f
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/53445
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 8b1d6654c..5d172417a 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