svx/source/svdraw/svdpage.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 64bf825d11805375b55d7416a8f67e8b66fbda45
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Jan 13 21:15:14 2026 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Wed Jan 14 13:58:38 2026 +0100

    Don't null-deref if pView is not present
    
    And default to COL_WHITE as view background if not present.
    
    Related: tdf#168710
    Change-Id: I184fb018d16ac83381b689093e751167bad2c2fb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197223
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index d7c7358f7f5b..8d1329cf923f 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1807,7 +1807,7 @@ SfxStyleSheet* SdrPage::GetTextStyleSheetForObject( 
SdrObject* pObj ) const
 // #i75566# GetBackgroundColor -> GetPageBackgroundColor and bScreenDisplay 
hint value
 Color SdrPage::GetPageBackgroundColor( SdrPageView const * pView, bool 
bScreenDisplay ) const
 {
-    Color aColor;
+    Color aColor(COL_WHITE);
 
     if(bScreenDisplay && (!pView || pView->GetApplicationDocumentColor() == 
COL_AUTO))
     {
@@ -1819,7 +1819,7 @@ Color SdrPage::GetPageBackgroundColor( SdrPageView const 
* pView, bool bScreenDi
             aColor = aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor;
         }
     }
-    else
+    else if (pView)
     {
         aColor = pView->GetApplicationDocumentColor();
     }

Reply via email to