svtools/source/contnr/foldertree.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f54f99febd25b1c86e77747764375a2e53f572c5
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Aug 18 08:25:29 2015 +0100

    coverity#1316521 Dereference null return value
    
    Change-Id: I6ec19df7b84e3529ef00640560540fda445dc82e

diff --git a/svtools/source/contnr/foldertree.cxx 
b/svtools/source/contnr/foldertree.cxx
index bc86533..acf54ac 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -92,12 +92,12 @@ void FolderTree::FillTreeEntry( const OUString & rUrl, 
const ::std::vector< std:
 
     if( pParent && !IsExpanded( pParent ) )
     {
-        while( GetChildCount( pParent ) > 0 )
+        while (SvTreeListEntry* pChild = FirstChild(pParent))
         {
-            SvTreeListEntry* pChild = FirstChild( pParent );
-            GetModel()->Remove( pChild );
+            GetModel()->Remove(pChild);
         }
 
+
         for(::std::vector< std::pair< OUString, OUString > >::const_iterator 
it = rFolders.begin(); it != rFolders.end() ; ++it)
         {
             SvTreeListEntry* pNewEntry = InsertEntry( it->first, pParent, true 
 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to