diff options
Diffstat (limited to 'chart2/source/tools/LifeTime.cxx')
-rw-r--r-- | chart2/source/tools/LifeTime.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 68ed06208d11..38aa07718d4a 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -371,7 +371,11 @@ CloseableLifeTimeManager::~CloseableLifeTimeManager() lang::EventObject aEvent( xCloseable ); ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) - (static_cast< util::XCloseListener*>(aIt.next()))->notifyClosing( aEvent ); + { + uno::Reference< util::XCloseListener > xListener( aIt.next(), uno::UNO_QUERY ); + if( xListener.is() ) + xListener->notifyClosing( aEvent ); + } } } } |