diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-07 09:18:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-07 13:54:36 +0200 |
commit | 7c399dabb25c4f40b9ac6fbde6bf0c0592e15d74 (patch) | |
tree | 4ae1eddbdc7b7025b9db9a4b12071364cfacbf4a /sw/source/uibase/uno | |
parent | 04d116fe90b07078c4fc79c30d7720d01622cc82 (diff) |
cid#1465669 Dereference after null check
SwXTextDocument::GetRenderDoc already uncondionally dereferences
pDocShell so we can assume its non null
Change-Id: I25edd2415ff052b1bdaa6d6a6d1a252a12b14100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100289
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 00cefea1e109..c4266e8ef36a 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2929,9 +2929,7 @@ void SAL_CALL SwXTextDocument::render( throw IllegalArgumentException(); // tdf#135244: prevent jumping to cursor at any temporary modification - decltype(pDocShell->LockAllViews()) aLock; - if (pDocShell) - aLock = pDocShell->LockAllViews(); + auto aLock = pDocShell->LockAllViews(); const bool bHasPDFExtOutDevData = lcl_SeqHasProperty( rxOptions, "HasPDFExtOutDevData" ); const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" ) || bHasPDFExtOutDevData; |