Kaydet (Commit) a94f0f92 authored tarafından Eike Rathke's avatar Eike Rathke

guard against null pointer access on LRU function list, fdo#60036

... which may have happened if the config's LRU contained enums of
non-existing functions, i.e. if they were shifted by an update.

Change-Id: I9a005f41cc74c530cf37d1782ce8c53b8f5dce6e
üst ff8cb18e
...@@ -791,12 +791,12 @@ void ScFunctionDockWin::UpdateFunctionList() ...@@ -791,12 +791,12 @@ void ScFunctionDockWin::UpdateFunctionList()
} }
else // LRU-Liste else // LRU-Liste
{ {
for(::std::vector<const formula::IFunctionDescription*>::iterator iter=aLRUList.begin();iter!=aLRUList.end();++iter) for (::std::vector<const formula::IFunctionDescription*>::iterator iter=aLRUList.begin();
iter != aLRUList.end(); ++iter)
{ {
const formula::IFunctionDescription* pDesc = *iter; const formula::IFunctionDescription* pDesc = *iter;
pAllFuncList->SetEntryData( if (pDesc)
pAllFuncList->InsertEntry(pDesc->getFunctionName()), pAllFuncList->SetEntryData( pAllFuncList->InsertEntry( pDesc->getFunctionName()), (void*)pDesc);
(void*)pDesc );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment