Don't allow placefiles with an empty name

This commit is contained in:
Dan Paulat 2023-09-11 22:19:04 -05:00
parent e14db6cd21
commit df4500478c
2 changed files with 23 additions and 10 deletions

View file

@ -356,10 +356,13 @@ void PlacefileManager::Impl::ReadPlacefileSettings()
PlacefileRecord record =
boost::json::value_to<PlacefileRecord>(placefileEntry);
self_->AddUrl(record.name_,
record.title_,
record.enabled_,
record.thresholded_);
if (!record.name_.empty())
{
self_->AddUrl(record.name_,
record.title_,
record.enabled_,
record.thresholded_);
}
}
catch (const std::exception& ex)
{