Skip to content

Commit 5fc24b4

Browse files
TomasDadoguitargeek
authored andcommitted
[RF] Fix RooAbsCollection::contentsString() for empty collections
Closes #20189.
1 parent 6371812 commit 5fc24b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roofit/roofitcore/src/RooAbsCollection.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,9 @@ std::string RooAbsCollection::contentsString() const
11431143
retVal += ",";
11441144
}
11451145

1146-
retVal.erase(retVal.end()-1);
1146+
if (!retVal.empty()) {
1147+
retVal.erase(retVal.end()-1);
1148+
}
11471149

11481150
return retVal;
11491151
}

0 commit comments

Comments
 (0)