coverity#1213242 Dereference null return value

Change-Id: I23ce35dbeadca1eea4c67d7d70acbf5ce3a82ac8
This commit is contained in:
Caolán McNamara 2014-05-13 21:03:18 +01:00
parent 6903b84809
commit bb7dad11e1

View File

@ -436,7 +436,8 @@ throw ( css::uno::RuntimeException, std::exception )
( VCLXPopupMenu * ) VCLXMenu::GetImplementation( m_xPopupMenu );
SolarMutexGuard aSolarMutexGuard;
PopupMenu* pVCLPopupMenu = dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() );
PopupMenu* pVCLPopupMenu = pTkPopupMenu ?
dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() ) : NULL;
if ( pVCLPopupMenu )
pMenuAttributes = reinterpret_cast< MenuConfiguration::Attributes* >(
pVCLPopupMenu->GetUserValue( pVCLPopupMenu->GetCurItemId() ) );