Commit 21d6a36ba05cead41a81588aa81ff108a6e38ecb
1 parent
8a3d351e
Avoid appending empty MC identifiers and names
Showing
1 changed file
with
3 additions
and
1 deletions
src/ctobssim/ctobssim.cpp
| @@ -1617,7 +1617,9 @@ void ctobssim::set_mc_id_names(GCTAObservation* obs, | @@ -1617,7 +1617,9 @@ void ctobssim::set_mc_id_names(GCTAObservation* obs, | ||
| 1617 | } // endfor: looped over all models | 1617 | } // endfor: looped over all models |
| 1618 | 1618 | ||
| 1619 | // Set correspondance for the event list | 1619 | // Set correspondance for the event list |
| 1620 | - events->set_mc_id_names(ids, names); | 1620 | + if ((ids.size() > 0) && (names.size() > 0)) { |
| 1621 | + events->set_mc_id_names(ids, names); | ||
| 1622 | + } | ||
| 1621 | 1623 | ||
| 1622 | } // endif: observation pointer was valid | 1624 | } // endif: observation pointer was valid |
| 1623 | 1625 |