diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-27 13:03:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-27 13:04:20 +0100 |
commit | 1192b227544c87f25a367ebff478cbdc190dad02 (patch) | |
tree | bfe6c2e40daef29b758574297ef2895d70ddd875 /sc | |
parent | 5ae64e4b0c23f209410fe84df041c9445234df74 (diff) |
Resolves: rhbz#802173 crash in ScRowStyles::GetStyleNameIndex
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index a04c75bb10cb..48d95020f58d 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -1290,6 +1290,9 @@ void ScRowStyles::AddNewTable(const sal_Int32 nTable, const sal_Int32 nFields) sal_Int32 ScRowStyles::GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32 nField) { OSL_ENSURE(static_cast<size_t>(nTable) < aTables.size(), "wrong table"); + if (!(static_cast<size_t>(nTable) < aTables.size())) + return -1; + if (maCache.hasCache(nTable, nField)) // Cache hit ! return maCache.mnStyle; |