test/DumpDatabase: fix nullptr dereference

This commit is contained in:
Max Kellermann 2014-01-09 09:05:54 +01:00
parent 8f9ba96c59
commit 43847f2244
1 changed files with 1 additions and 1 deletions

View File

@ -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);