ConfigData: handle default_value==nullptr

Return Path::Null() instead of dying from assertion failure.
This commit is contained in:
Max Kellermann 2013-10-02 08:56:02 +02:00
parent 0e0be0243b
commit 0339c8d025
1 changed files with 5 additions and 1 deletions

View File

@ -108,8 +108,12 @@ config_param::GetBlockPath(const char *name, const char *default_value,
if (bp != nullptr) {
line2 = bp->line;
s = bp->value.c_str();
} else
} else {
if (default_value == nullptr)
return Path::Null();
s = default_value;
}
Path path = ParsePath(s, error);
if (gcc_unlikely(path.IsNull()))