sw/source/uibase/uno/unotxdoc.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 7c399dabb25c4f40b9ac6fbde6bf0c0592e15d74 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 7 09:18:32 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Aug 7 13:54:36 2020 +0200 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 <caol...@redhat.com> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits