diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 04bba6e6f663..99a55580f9e0 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -84,7 +84,7 @@ TVFactory::createInstanceWithArguments( { if( ! m_xHDS.is() ) { - m_xHDS = static_cast(new TVChildTarget( m_xContext )); + m_xHDS = cppu::getXWeak(new TVChildTarget( m_xContext )); } OUString hierview;