diff options
Diffstat (limited to 'sd/source/core/drawdoc3.cxx')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ec5416cc1f58..33e457b03cc9 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -929,7 +929,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( for(sal_uInt32 p = nInsertPos; p < (nInsertPos + nBMSdPageCount); p++) { SdPage *pPg = static_cast<SdPage *>( GetPage(p) ); - for(size_t i = 0; i < pPg->GetObjCount(); ++i) + for(size_t i = 0; pPg && (i < pPg->GetObjCount()); ++i) { if(pPg->GetObj(i)->GetStyleSheet()) { |