diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-18 14:46:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-18 14:46:38 +0200 |
commit | a268011a6fe4c5bd0cbacbb0571a61517cad8be2 (patch) | |
tree | d210013014d15e081bcaa1f57cc08983af03467a /cui | |
parent | 64ecef189f6ecc924d94a48a089df4ec7cac7b13 (diff) |
-fsanitize=signed-integer-overflow
Change-Id: I1a79d34dd25073de46bda47af1789fd7e69fe648
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index c85a80ed2c08..00d1a7b35248 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 |