Skip to content

Commit 206cf74

Browse files
authored
Mergers: avoid a crash if STOP happens without having received inputs (#13284)
1 parent 8298819 commit 206cf74

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Utilities/Mergers/src/FullHistoryMerger.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ void FullHistoryMerger::mergeCache()
145145
{
146146
LOG(debug) << "Merging " << mCache.size() + 1 << " objects.";
147147

148+
if (mFirstObjectSerialized.second.payload == nullptr) {
149+
// no objects arrived to the Merger yet, nothing to use.
150+
return;
151+
}
152+
148153
mMergedObject = object_store_helpers::extractObjectFrom(mFirstObjectSerialized.second);
149154
assert(!std::holds_alternative<std::monostate>(mMergedObject));
150155
mObjectsMerged++;

0 commit comments

Comments
 (0)