diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-25 01:19:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-25 01:19:26 +0200 |
commit | 904596e935144e97d762d09942fa0d35068882ce (patch) | |
tree | 825a792c93ca7153849f1a047e2eb6c3bdb718f8 | |
parent | d4e2a95a2f7376c36c1241f91a55021fc856c758 (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.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 35408afbfe05..7f17f84fe001 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(); |