[Libreoffice-commits] core.git: svx/source

Julien Nabet serval2412 at yahoo.fr
Wed Mar 20 07:17:44 PDT 2013


 svx/source/form/fmshimp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5879775875cd769bca29ca87e758c13e34a7ff00
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Mar 20 14:25:23 2013 +0100

    Related to coverity#704822 (Explicit null dereference)
    
    aSlotIds.push_back(0) => aSlotIds can't be empty => pSlotIds can't be null
    So no 704822
    
    Change-Id: I52237fcd4f160a294c23307c2e33b515372b3c92
    Reviewed-on: https://gerrit.libreoffice.org/2872
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 7226140..1685ace 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -883,7 +883,7 @@ void FmXFormShell::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatu
         // and, last but not least, SFX wants the ids to be sorted
         ::std::sort( aSlotIds.begin(), aSlotIds.end() - 1 );
 
-        sal_uInt16 *pSlotIds = aSlotIds.empty() ? 0 : &(aSlotIds[0]);
+        sal_uInt16 *pSlotIds = &(aSlotIds[0]);
         m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( pSlotIds );
     }
 }


More information about the Libreoffice-commits mailing list