summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-03 20:17:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-03 20:33:45 +0100
commitf1a5b2869a8970ec637573d10e5c7cbb5d985902 (patch)
tree0923ee75e165e64f4b294255609d17696bc08f59 /svtools
parent1bc0cd0ee0251d42a6cbe75e5d86de4366f59029 (diff)
coverity#1315003 Dereference null return value
Change-Id: I85a85e10d727e53f93d0c41c1f9896b4319919af
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/foldertree.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index d59716840549..71313409432e 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -34,10 +34,9 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
{
if( pEntry )
{
- while( GetChildCount( pEntry ) > 0 )
+ while (SvTreeListEntry* pChild = FirstChild(pEntry))
{
- SvTreeListEntry* pChild = FirstChild( pEntry );
- GetModel()->Remove( pChild );
+ GetModel()->Remove(pChild);
}
::std::vector< SortingData_Impl* > aContent;