[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Mon Jan 27 04:09:47 PST 2014


 sc/source/ui/formdlg/dwfunctr.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a94f0f92e8b09f6cd3989b646500ff5814274621
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jan 27 13:02:29 2014 +0100

    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

diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index bc72d0d..25fc96e 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);
         }
     }
 


More information about the Libreoffice-commits mailing list