summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-25 01:19:26 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-25 01:24:33 +0200
commit34027323e0177145eaa5519d1b289f2fc4f435f7 (patch)
tree4d617d09f99b09af3e4cc8be3b69aeacc90a9b6b
parentf2c3eaacad5a17d6a7745b2e29c491c3fd6a1162 (diff)
we still need to check that we have a token, fdo#51326
also fixed another dbgutil crash with gcc safe iterators Change-Id: I5e6675a26f24329125906849c0c2286ea74e9211
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 03028fcef702..00cbee882c90 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -308,11 +308,11 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount, SCROW nAllRowCount,
{
FormulaTokenMap* pCol = it1->second;
FormulaTokenMap::const_iterator it2 = pCol->begin();
- for (SCROW nRow = 0; !bFoundValues && nRow < nSmallestValueRowIndex; ++nRow)
+ for (SCROW nRow = 0; !bFoundValues && nRow < nSmallestValueRowIndex && it2 != pCol->end(); ++nRow)
{
- if (it2 != pCol->end() && nRow>=nHeaderRowCount)
+ FormulaToken* pToken = it2->second;
+ if (pToken && nRow>=nHeaderRowCount)
{
- FormulaToken* pToken = it2->second;
ScRange aRange;
bool bExternal = false;
StackVar eType = pToken->GetType();