diff options
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index f5a7f112ca6e..c087ade87b5e 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2369,7 +2369,8 @@ OUString SdXImpressDocument::getPartInfo(int nPart) if (!pViewSh) return OUString(); - const bool bIsVisible = !pViewSh->GetDoc()->GetSdPage(nPart, pViewSh->GetPageKind())->IsExcluded(); + const SdPage* pSdPage = mpDoc->GetSdPage(nPart, pViewSh->GetPageKind()); + const bool bIsVisible = pSdPage && !pSdPage->IsExcluded(); const bool bIsSelected = pViewSh->IsSelected(nPart); const sal_Int16 nMasterPageCount= pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind()); |