summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-18 08:25:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-18 12:04:54 +0100
commitf54f99febd25b1c86e77747764375a2e53f572c5 (patch)
tree7a13e3684328ea4d2bd6e0b708a15b9947a66e93
parentc5a516bd1bf0216ee39f31322369f6bffdf464eb (diff)
coverity#1316521 Dereference null return value
Change-Id: I6ec19df7b84e3529ef00640560540fda445dc82e
-rw-r--r--svtools/source/contnr/foldertree.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index bc86533ed5cf..acf54ac9a579 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 );