summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-18 14:46:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-18 14:46:38 +0200
commita268011a6fe4c5bd0cbacbb0571a61517cad8be2 (patch)
treed210013014d15e081bcaa1f57cc08983af03467a /cui
parentUpdated core (diff)
downloadcore-a268011a6fe4c5bd0cbacbb0571a61517cad8be2.tar.gz
core-a268011a6fe4c5bd0cbacbb0571a61517cad8be2.zip
-fsanitize=signed-integer-overflow
Change-Id: I1a79d34dd25073de46bda47af1789fd7e69fe648
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpcolor.cxx6
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