From eb86fdfbea6254d6966e59d80b43af3e5152fe3f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Jun 2015 23:14:40 +0200 Subject: SongFilter: return "const char *" instead of std::string --- src/db/Selection.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/db/Selection.cxx') diff --git a/src/db/Selection.cxx b/src/db/Selection.cxx index 4a4016485..4c941823a 100644 --- a/src/db/Selection.cxx +++ b/src/db/Selection.cxx @@ -26,8 +26,11 @@ DatabaseSelection::DatabaseSelection(const char *_uri, bool _recursive, { /* optimization: if the caller didn't specify a base URI, pick the one from SongFilter */ - if (uri.empty() && filter != nullptr) - uri = filter->GetBase(); + if (uri.empty() && filter != nullptr) { + auto base = filter->GetBase(); + if (base != nullptr) + uri = base; + } } bool -- cgit v1.2.3