coverity#704779 Unchecked dynamic_cast

Change-Id: Ida8bdc0930142ecf602b5aef4414cc6302bfa18b
This commit is contained in:
Caolán McNamara
2014-06-06 10:26:52 +01:00
parent 4ee265eeae
commit 9af8782493

View File

@@ -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;