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

Stephan Bergmann sbergman at redhat.com
Mon Jul 18 12:47:07 UTC 2016


 cui/source/tabpages/tpcolor.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a268011a6fe4c5bd0cbacbb0571a61517cad8be2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jul 18 14:46:38 2016 +0200

    -fsanitize=signed-integer-overflow
    
    Change-Id: I1a79d34dd25073de46bda47af1789fd7e69fe648

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index c85a80e..00d1a7b 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -653,7 +653,11 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
         aPreviousColor = aColorItem.GetColorValue();
         aNewColor = aColorItem.GetColorValue();
         m_pLbColor->SelectEntry(aNewColor);
-        m_pValSetColorList->SelectItem( m_pLbColor->GetSelectEntryPos() + 1 );
+        auto pos = m_pLbColor->GetSelectEntryPos();
+        if (pos != LISTBOX_ENTRY_NOTFOUND)
+        {
+            m_pValSetColorList->SelectItem( pos + 1 );
+        }
     }
 
     // set color model


More information about the Libreoffice-commits mailing list