diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 8514e4417ca3..d3d9824dcc82 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -318,8 +318,12 @@ void DocumentFocusListener::attachRecursive( uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + if (!xBroadcaster.is()) + return; + // If not already done, add the broadcaster to the list and attach as listener. - if( xBroadcaster.is() && m_aRefList.insert(xBroadcaster).second ) + uno::Reference< uno::XInterface > xInterface = xBroadcaster; + if( m_aRefList.insert(xInterface).second ) { xBroadcaster->addEventListener(static_cast< accessibility::XAccessibleEventListener *>(this)); |