aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-09 09:05:54 +0100
committerMax Kellermann <max@duempel.org>2014-01-09 09:05:58 +0100
commit43847f2244a34064af24704aac4cfad4a3c76f7d (patch)
tree7fd43200da8a7b5090bb6c405a2800e07d7aa78b /test
parent8f9ba96c59f7d3563e1c3229675ecf7ad16fc334 (diff)
downloadmpd-43847f2244a34064af24704aac4cfad4a3c76f7d.tar.gz
mpd-43847f2244a34064af24704aac4cfad4a3c76f7d.tar.xz
mpd-43847f2244a34064af24704aac4cfad4a3c76f7d.zip
test/DumpDatabase: fix nullptr dereference
Diffstat (limited to 'test')
-rw-r--r--test/DumpDatabase.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index ec7de7e45..14bb4ba14 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -99,7 +99,7 @@ main(int argc, char **argv)
/* do it */
const struct config_param *path = config_get_param(CONF_DB_FILE);
- config_param param("database", path->line);
+ config_param param("database", path != nullptr ? path->line : -1);
if (path != nullptr)
param.AddBlockParam("path", path->value.c_str(), path->line);