[Libreoffice-commits] .: sc/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Thu Mar 22 02:06:42 PDT 2012
sc/source/ui/unoobj/chart2uno.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit e1b4216816ba927f171030101f272f7ec0eb8314
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Mar 22 10:06:16 2012 +0100
ChartTokenMap can contain null pointers
db3786ee3aa0d8911042c9bbcea02cf36d96dfa1 caused chart2_unoapi test to crash
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 469eb1d..9f5e3cd 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -309,9 +309,10 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount, SCROW nAllRowCount,
ScTokenPtrMap::iterator tokenIter = pCol->begin();
for (SCROW nRow = 0; !bFoundValues && nRow < nSmallestValueRowIndex; ++nRow)
{
- if (tokenIter != pCol->end() && nRow>=nHeaderRowCount)
+ ScToken* pToken =
+ tokenIter == pCol->end() ? 0 : tokenIter->second;
+ if (pToken && nRow>=nHeaderRowCount)
{
- ScToken* pToken = tokenIter->second;
ScRange aRange;
bool bExternal = false;
StackVar eType = pToken->GetType();
More information about the Libreoffice-commits
mailing list