sd/source/core/drawdoc3.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit e71eab276666729d421cb5c6601ac9a6636dd4be
Author: Mohamed Ali <[email protected]>
AuthorDate: Fri Mar 28 08:35:33 2025 +0200
Commit: Stephan Bergmann <[email protected]>
CommitDate: Fri Mar 28 11:43:44 2025 +0100
Add validation to pStandardPage pointer to avoid accessing a null pointer
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win_analyze/sd/source/core/drawdoc3.cxx(780):
error C2220: the following warning is treated as an error
C:
Change-Id: Ic3c6253be150c2689499d4118d5b2b8c88c4da68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183426
Reviewed-by: Xisco Fauli <[email protected]>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index fa5173cefe2b..f848c9b9ba3c 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -763,7 +763,10 @@ void SdDrawDocument::insertSelectedPages(const
PageNameList& rBookmarkList,
SdPage* pNewNotesPage = static_cast<SdPage*>(
GetPage(nActualInsertPos+1));
if (pNewNotesPage)
+ {
+ assert(pStandardPage);
pNewNotesPage->SetName(pStandardPage->GetRealName());
+ }
}
if( rParams.bUndo )