summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 71b792d47739..870a9f15b009 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1667,7 +1667,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
SdPresentationLayoutUndoAction * pPLUndoAction =
new SdPresentationLayoutUndoAction
(this,
- pPage->IsMasterPage() ? aLayoutName : aOldLayoutName,
+ ( pPage && pPage->IsMasterPage() ) ? aLayoutName : aOldLayoutName,
aLayoutName,
eAutoLayout, eAutoLayout, sal_False, *pIter);
pUndoMgr->AddUndoAction(pPLUndoAction);