From e98e2a0b07363132707146f571d3411e3e1b8076 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sun, 27 Jan 2013 13:26:17 +0600 Subject: Path::FromUTF8() returns nulled instance on error, add error handling where required --- src/UpdateWalk.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/UpdateWalk.cxx') diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx index 3e0dfe48d..322a8fce2 100644 --- a/src/UpdateWalk.cxx +++ b/src/UpdateWalk.cxx @@ -104,7 +104,7 @@ remove_excluded_from_directory(Directory *directory, directory_for_each_child_safe(child, n, directory) { const Path name_fs = Path::FromUTF8(child->GetName()); - if (exclude_list.Check(name_fs.c_str())) { + if (name_fs.IsNull() || exclude_list.Check(name_fs.c_str())) { delete_directory(child); modified = true; } @@ -115,7 +115,7 @@ remove_excluded_from_directory(Directory *directory, assert(song->parent == directory); const Path name_fs = Path::FromUTF8(song->uri); - if (exclude_list.Check(name_fs.c_str())) { + if (name_fs.IsNull() || exclude_list.Check(name_fs.c_str())) { delete_song(directory, song); modified = true; } -- cgit v1.2.3