summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 05d9af5ca483..898eeda69772 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3228,8 +3228,6 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawP
if( nullptr == mpModel || mpModel->mpDoc == nullptr )
throw lang::DisposedException();
- SdDrawDocument& rDoc = *mpModel->mpDoc;
-
SdMasterPage* pSdPage = SdMasterPage::getImplementation( xPage );
if(pSdPage == nullptr)
return;
@@ -3246,6 +3244,8 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawP
{
sal_uInt16 nPage = pPage->GetPageNum();
+ SdDrawDocument& rDoc = *mpModel->mpDoc;
+
SdPage* pNotesPage = static_cast< SdPage* >( rDoc.GetMasterPage( nPage+1 ) );
bool bUndo = rDoc.IsUndoEnabled();