summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-12-23 21:26:35 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-12-23 21:37:48 +0100
commite225b0925b371bd33d40d97c240bd3165b628464 (patch)
tree01aa49d6359a6518cd66beb74c2f30036e265ae3 /sc
parent2e9a3ad1c6ce34af70d007cb6eda54888139f250 (diff)
Don't crash when nIndex < 0
Change-Id: I24ba4365d9d5f78e875ea51382c6b1f864b2e5fe
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 1c61dbffd0ce..aa99980bf2e0 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -349,7 +349,7 @@ void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
{
SolarMutexGuard aGuard;
- if (nIndex < static_cast<sal_Int32>(aEntries.size()))
+ if (nIndex < static_cast<sal_Int32>(aEntries.size()) && nIndex >= 0)
{
std::vector<ScTableConditionalEntry*>::iterator iter = aEntries.begin()+nIndex;