Remove check in backgrounf parsing.

This commit is contained in:
levlam 2023-12-22 16:48:16 +03:00
parent 3e42417a0f
commit 15132a398f
1 changed files with 2 additions and 2 deletions

View File

@ -503,8 +503,8 @@ void BackgroundManager::store_background(BackgroundId background_id, LogEventSto
void BackgroundManager::parse_background(BackgroundId &background_id, LogEventParser &parser) {
Background background;
parse(background, parser);
CHECK(background.has_new_local_id);
if (background.file_id.is_valid() != background.type.has_file() || !background.id.is_valid()) {
if (!background.has_new_local_id || background.file_id.is_valid() != background.type.has_file() ||
!background.id.is_valid()) {
parser.set_error(PSTRING() << "Failed to load " << background.id);
background_id = BackgroundId();
return;