summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-05-17 23:17:10 -0430
committerKohei Yoshida <kyoshida@novell.com>2011-05-17 23:59:11 -0400
commitd33a4bd2c7a041b9081d3bec67f43830aef3fef6 (patch)
treee7f946341596d60eef3502a6bf35ab413c8f4ba6
parent3bc9bde9abbf304f181279ec541cd18f0e5dcf8e (diff)
Fix index out of bounds in ScTableConditionalFormat.
-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 7e1694d85..457e79f51 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -287,7 +287,7 @@ void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry
ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
- return aEntries[nIndex];
+ return nIndex < aEntries.size() ? aEntries[nIndex] : NULL;
}
void SAL_CALL ScTableConditionalFormat::addNew(