diff options
Diffstat (limited to 'vbahelper/source/msforms/vbauserform.cxx')
-rw-r--r-- | vbahelper/source/msforms/vbauserform.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index a76f67543d61..8f3c158c4e5a 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -85,18 +85,18 @@ ScVbaUserForm::Show( ) aRet = m_xDialog->execute(); } SAL_INFO("vbahelper", "ScVbaUserForm::Show() execute returned " << aRet); - if ( mbDispose ) + if ( !mbDispose ) + return; + + try + { + uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW ); + m_xDialog = nullptr; + xComp->dispose(); + mbDispose = false; + } + catch( uno::Exception& ) { - try - { - uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW ); - m_xDialog = nullptr; - xComp->dispose(); - mbDispose = false; - } - catch( uno::Exception& ) - { - } } } |