summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-05-22 12:02:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-05-22 14:35:04 +0200
commit7dcab55d97713b48b003e20590ebd51c77b60391 (patch)
tree6f22240ce3f9cdd89d222e3509117af09f4efa0a /sc
parent3d29f5860f3c836d528e9cce7b6096b4ae5a6f7f (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx2
1 files changed, 1 insertions, 1 deletions
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())