Kaydet (Commit) 58a48ace authored tarafından Caolán McNamara's avatar Caolán McNamara

V595: pointer was utilized before it was verified against nullptr

Change-Id: I271e045ed2f80e648d620f26cd60215f7f806bd1
üst dc236336
......@@ -196,19 +196,16 @@ uno::Any SAL_CALL SdXCustomPresentation::getByIndex( sal_Int32 Index )
if( bDisposing )
throw lang::DisposedException();
if( Index < 0 || Index >= (sal_Int32)mpSdCustomShow->PagesVector().size() )
if (Index < 0 || !mpSdCustomShow || Index >= (sal_Int32)mpSdCustomShow->PagesVector().size())
throw lang::IndexOutOfBoundsException();
uno::Any aAny;
if(mpSdCustomShow )
{
SdrPage* pPage = (SdrPage*)mpSdCustomShow->PagesVector()[Index];
SdrPage* pPage = (SdrPage*)mpSdCustomShow->PagesVector()[Index];
if( pPage )
{
uno::Reference< drawing::XDrawPage > xRef( pPage->getUnoPage(), uno::UNO_QUERY );
aAny <<= xRef;
}
if( pPage )
{
uno::Reference< drawing::XDrawPage > xRef( pPage->getUnoPage(), uno::UNO_QUERY );
aAny <<= xRef;
}
return aAny;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment