summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-01-27 13:02:29 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-31 01:22:49 +0000
commit6592543a598994e44823b7e1158e34b0c6ec82d3 (patch)
treed4aacfd2c9f6deb63e4edfbc6569f73419969ef0
parent2fe174915f7f2f58dbd800b961ecfd1a3bec01d4 (diff)
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 (cherry picked from commit a94f0f92e8b09f6cd3989b646500ff5814274621) Reviewed-on: https://gerrit.libreoffice.org/7750 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 7967163a94dc..322cf4b6c0a5 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -791,12 +791,12 @@ void ScFunctionDockWin::UpdateFunctionList()
}
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;
- pAllFuncList->SetEntryData(
- pAllFuncList->InsertEntry(pDesc->getFunctionName()),
- (void*)pDesc );
+ if (pDesc)
+ pAllFuncList->SetEntryData( pAllFuncList->InsertEntry( pDesc->getFunctionName()), (void*)pDesc);
}
}