summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/frmview.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 3121d6478d5a..d780e1db0f34 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -578,7 +578,8 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
const sal_Int32 nLength = rSequence.getLength();
if (nLength)
{
- const bool bImpress = dynamic_cast< SdDrawDocument* >(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
+ SdDrawDocument* pDrawDocument = dynamic_cast<SdDrawDocument*>(GetModel());
+ const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
bool bBool = false;
sal_Int32 nInt32 = 0;