diff options
author | Eike Rathke <erack@redhat.com> | 2014-01-27 13:02:29 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-31 01:22:49 +0000 |
commit | 6592543a598994e44823b7e1158e34b0c6ec82d3 (patch) | |
tree | d4aacfd2c9f6deb63e4edfbc6569f73419969ef0 /sc | |
parent | 2fe174915f7f2f58dbd800b961ecfd1a3bec01d4 (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>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/formdlg/dwfunctr.cxx | 8 |
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); } } |