diff options
author | Eike Rathke <erack@redhat.com> | 2014-01-27 13:02:29 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-01-27 13:09:11 +0100 |
commit | a94f0f92e8b09f6cd3989b646500ff5814274621 (patch) | |
tree | cd8968fe8693b9ea11db7292a38d1c6a692a2bb4 | |
parent | ff8cb18e21e95e51239f736a525016db689653f0 (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
-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 bc72d0dfe70b..25fc96e8e96c 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); } } |