fdo#37252: Don't assume you'll always find a match.
The original code assumed that the find call always returns a match. Apparently that assumption is not always true. Signed-off-by: Norbert Thiebaud <nthiebaud@gmail.com>
This commit is contained in:
@@ -669,7 +669,11 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvLBoxEntry* pParent,Formul
|
||||
// #i101512# for output, the original token is needed
|
||||
FormulaToken* pOrigToken = (_pToken->GetType() == svFAP) ? _pToken->GetFAPOrigToken() : _pToken;
|
||||
uno::Sequence<sheet::FormulaToken> aArgs(1);
|
||||
aArgs[0] = m_aTokenMap.find(pOrigToken)->second;
|
||||
::std::map<FormulaToken*,sheet::FormulaToken>::const_iterator itr = m_aTokenMap.find(pOrigToken);
|
||||
if (itr == m_aTokenMap.end())
|
||||
return;
|
||||
|
||||
aArgs[0] = itr->second;
|
||||
try
|
||||
{
|
||||
const table::CellAddress aRefPos(m_pHelper->getReferencePosition());
|
||||
|
Reference in New Issue
Block a user