diff options
| author | Marisa-Chan | 2014-12-19 17:15:21 +0600 | 
|---|---|---|
| committer | Marisa-Chan | 2014-12-19 17:15:21 +0600 | 
| commit | 6c5c1828e1e7ed28865093de12156f6b99fdd40f (patch) | |
| tree | 00e05ce6f9236cba5c6fab8ec84cc49ed07b3f7e /engines/zvision/file/search_manager.cpp | |
| parent | ee7ba1bbaf4a17104f8a61be0218f9793b0b9cf6 (diff) | |
| download | scummvm-rg350-6c5c1828e1e7ed28865093de12156f6b99fdd40f.tar.gz scummvm-rg350-6c5c1828e1e7ed28865093de12156f6b99fdd40f.tar.bz2 scummvm-rg350-6c5c1828e1e7ed28865093de12156f6b99fdd40f.zip  | |
ZVISION: Fix unchecked return value (CID 1257092)
Diffstat (limited to 'engines/zvision/file/search_manager.cpp')
| -rw-r--r-- | engines/zvision/file/search_manager.cpp | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/zvision/file/search_manager.cpp b/engines/zvision/file/search_manager.cpp index 1a6a96ec6d..30c269c290 100644 --- a/engines/zvision/file/search_manager.cpp +++ b/engines/zvision/file/search_manager.cpp @@ -265,13 +265,14 @@ void SearchManager::addDir(const Common::String &name) {  void SearchManager::listDirRecursive(Common::List<Common::String> &_list, const Common::FSNode &fsNode, int depth) {  	Common::FSList fsList; -	fsNode.getChildren(fsList); +	if ( fsNode.getChildren(fsList) ) { -	_list.push_back(fsNode.getPath()); +		_list.push_back(fsNode.getPath()); -	if (depth > 1) -		for (Common::FSList::const_iterator it = fsList.begin(); it != fsList.end(); ++it) -			listDirRecursive(_list, *it, depth - 1); +		if (depth > 1) +			for (Common::FSList::const_iterator it = fsList.begin(); it != fsList.end(); ++it) +				listDirRecursive(_list, *it, depth - 1); +	}  }  } // End of namespace ZVision  | 
