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

Takeshi Abe tabe at fixedpoint.jp
Wed May 13 03:56:42 PDT 2015


 chart2/source/controller/main/DrawCommandDispatch.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 47ac1b7445520c04f4c98bac925fe14257fd8098
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed May 13 00:16:54 2015 +0900

    perform a proper boundary check, just in case
    
    Change-Id: I4713b88a2130658513fd64793129c855169f0187
    Reviewed-on: https://gerrit.libreoffice.org/15720
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 8804bb9..27479169 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -381,7 +381,7 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea
                 const beans::PropertyValue* pKeyModifier = ::std::find_if(
                     pIter, pEnd, ::std::bind2nd( PropertyValueCompare(), boost::cref( sKeyModifier ) ) );
                 sal_Int16 nKeyModifier = 0;
-                if ( pKeyModifier && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1 )
+                if ( pKeyModifier != pEnd && pKeyModifier && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1 )
                 {
                     if ( eDrawMode == CHARTDRAW_INSERT )
                     {


More information about the Libreoffice-commits mailing list