summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/ChartView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/view/main/ChartView.cxx')
-rw-r--r--chart2/source/view/main/ChartView.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 549ef0273595..c5ba0c38ab05 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2829,7 +2829,11 @@ void ChartView::impl_notifyModeChangeListener( const rtl::OUString& rNewMode )
util::ModeChangeEvent aEvent( static_cast< uno::XWeak* >( this ), rNewMode );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
- (static_cast< util::XModeChangeListener*>(aIt.next()))->modeChanged( aEvent );
+ {
+ uno::Reference< util::XModeChangeListener > xListener( aIt.next(), uno::UNO_QUERY );
+ if( xListener.is() )
+ xListener->modeChanged( aEvent );
+ }
}
}
catch( uno::Exception& ex)