sd/source/ui/view/DocumentRenderer.cxx |    3 +--
 sw/source/core/unocore/unostyle.cxx    |    6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit e92db94e19c869050140fc1df64c09b59e97cd67
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Dec 7 12:12:29 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Dec 7 15:20:25 2024 +0100

    cid#1636579 Dereference after null check
    
    and
    
    cid#1636580 Dereference after null check
    cid#1636581 Dereference after null check
    
    Change-Id: I856876a99a0bbccf27055d2db0dd24f7f040d3af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178036
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 67facb9fcf58..44b710f6d8fc 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -958,7 +958,7 @@ rtl::Reference<SwXBaseStyle> 
SwXStyleFamily::getStyleByName(const OUString& rNam
     SolarMutexGuard aGuard;
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.poolId(),
-            m_pDocShell && !m_pDocShell->GetDoc()->IsInWriterfilterImport());
+            !m_pDocShell->GetDoc()->IsInWriterfilterImport());
     if(!m_pBasePool)
         throw uno::RuntimeException();
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, 
m_rEntry.family());
@@ -1026,7 +1026,7 @@ void SwXStyleFamily::insertStyleByName(const OUString& 
rName, const rtl::Referen
         throw uno::RuntimeException();
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.poolId(),
-            m_pDocShell && !m_pDocShell->GetDoc()->IsInWriterfilterImport());
+            !m_pDocShell->GetDoc()->IsInWriterfilterImport());
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, 
m_rEntry.family());
     if (pBase)
         throw container::ElementExistException();
@@ -1040,7 +1040,7 @@ void SwXStyleFamily::insertByName(const OUString& rName, 
const uno::Any& rElemen
         throw uno::RuntimeException();
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.poolId(),
-            m_pDocShell && !m_pDocShell->GetDoc()->IsInWriterfilterImport());
+            !m_pDocShell->GetDoc()->IsInWriterfilterImport());
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, 
m_rEntry.family());
     if (pBase)
         throw container::ElementExistException();
commit c97decfe2e4544f76a2b6f5704928cad0e30b56e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Dec 7 12:02:47 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Dec 7 15:20:13 2024 +0100

    cid#1636576 Dereference null return value
    
    since:
    
    commit 43e511e642a2ce7026b30ea5c212940ff3eb522e
    CommitDate: Wed Dec 4 10:17:24 2024 +0100
    
        tdf#88226 sd: fix cutting off the overflow text on the notes print page
    
    Change-Id: I0a982a0a4213e220ec1bbd166e08bf14191eed0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178032
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 9812d963e604..0c7fd6e5698c 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -2454,9 +2454,8 @@ private:
                             rInfo.meOrientation,
                             nPaperBin));
             }
-            else // Notes
+            else if (SdPage* pPage = GetFilteredPage(nPageIndex, 
PageKind::Notes))// Notes
             {
-                SdPage* pPage = GetFilteredPage(nPageIndex, PageKind::Notes);
                 SdDrawDocument* pDocument = 
mrBase.GetMainViewShell()->GetDoc();
 
                 // Clone the current page to create an independent instance.

Reply via email to