summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-07-12 13:15:47 +0000
committerKurt Zenker <kz@openoffice.org>2005-07-12 13:15:47 +0000
commit9513f8286ad5e8502b7826780d2af2ca69a6a112 (patch)
treef0323dda2566c552143e28deceb268c967075ef4 /framework
parent384db44b92ba36bbb15df68a0dcd633dd2930813 (diff)
INTEGRATION: CWS fwk16 (1.11.50); FILE MERGED
2005/06/10 07:44:42 cd 1.11.50.1: #50552# Check m_xPopupMenu reference before use
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 5dcfd53170e8..04fd8d90b695 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: toolbarsmenucontroller.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: rt $ $Date: 2005-03-29 15:00:44 $
+ * last change: $Author: kz $ $Date: 2005-07-12 14:15:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -570,15 +570,18 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev
{
rtl::OUString aFeatureURL( Event.FeatureURL.Complete );
- ResetableGuard aLock( m_aLock );
-
// All other status events will be processed here
sal_Bool bSetCheckmark = sal_False;
sal_Bool bCheckmark = sal_False;
+ ResetableGuard aLock( m_aLock );
+ Reference< css::awt::XPopupMenu > xPopupMenu( m_xPopupMenu );
+ aLock.unlock();
+
+ if ( xPopupMenu.is() )
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu );
+ VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( xPopupMenu );
PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu();
for ( USHORT i = 0; i < pVCLPopupMenu->GetItemCount(); i++ )