sc/source/ui/unoobj/styleuno.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 7dcab55d97713b48b003e20590ebd51c77b60391 Author: Caolán McNamara <[email protected]> AuthorDate: Sun May 22 12:02:58 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun May 22 14:35:04 2022 +0200 cid#1504542 Dereference before null check Change-Id: I3a3ee9ddc09d63fb33fd041353399b3aa4f79d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134724 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 2bcc869ac31a..f97129a079a5 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1742,7 +1742,6 @@ void ScStyleObj::setPropertyValue_Impl( std::u16string_view rPropertyName, const //! DocFunc-?? //! Undo ?? - ScDocument& rDoc = pDocShell->GetDocument(); if ( eFamily == SfxStyleFamily::Para ) { // If we are loading, we can delay line height calculation, because we are going to re-calc all of those @@ -1755,6 +1754,7 @@ void ScStyleObj::setPropertyValue_Impl( std::u16string_view rPropertyName, const double nPPTX = aLogic.X() / 1000.0; double nPPTY = aLogic.Y() / 1000.0; Fraction aZoom(1,1); + ScDocument& rDoc = pDocShell->GetDocument(); rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom ); if (!rDoc.IsImportingXML())
