aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Selection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/Selection.cxx')
-rw-r--r--src/db/Selection.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/db/Selection.cxx b/src/db/Selection.cxx
index a886916cb..4c941823a 100644
--- a/src/db/Selection.cxx
+++ b/src/db/Selection.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -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