[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - framework/source
Caolán McNamara
caolanm at redhat.com
Sun Feb 9 10:48:38 PST 2014
framework/source/uielement/controlmenucontroller.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 0867eac7f862a9f871186df3482e8c1362a15175
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 9 15:50:10 2014 +0000
coverity#1169826 Dereference after null check
Change-Id: Ie431672b5a6ba1d613ae1cb9e48fa6d1db6a6b4a
(cherry picked from commit 57e0062f2043f7a0382db5f4d01c6c70ca8aca46)
Reviewed-on: https://gerrit.libreoffice.org/7953
Tested-by: Andrzej Hunt <andrzej.hunt at collabora.com>
Reviewed-by: Andrzej Hunt <andrzej.hunt at collabora.com>
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index b5e4302..1a1f410 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -209,7 +209,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu )
if ( pResMgr->IsAvailable( aResId ))
{
ImageList aImageList( aResId );
- for ( sal_uInt32 i=0; i < sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i )
+ for ( sal_uInt32 i=0; i < sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i )
{
// das entsprechende Image dran
if ( m_bShowMenuImages )
@@ -356,9 +356,11 @@ void ControlMenuController::impl_setPopupMenu()
ResId aResId( RID_FMSHELL_CONVERSIONMENU, *pResMgr );
aResId.SetRT( RSC_MENU );
if ( pResMgr->IsAvailable( aResId ))
+ {
m_pResPopupMenu = new PopupMenu( aResId );
+ updateImagesPopupMenu( m_pResPopupMenu );
+ }
- updateImagesPopupMenu( m_pResPopupMenu );
delete pResMgr;
}
} // if ( m_pResPopupMenu == 0 )
More information about the Libreoffice-commits
mailing list