aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Selection.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/db/Selection.cxx7
1 files changed, 5 insertions, 2 deletions
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