From e7508788bc778348c14e0d27fbb9c79d04847eb0 Mon Sep 17 00:00:00 2001 From: Emily Dolson Date: Mon, 4 Dec 2023 22:43:58 -0500 Subject: [PATCH] Fix segfault in load --- include/emp/Evolve/Systematics.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/emp/Evolve/Systematics.hpp b/include/emp/Evolve/Systematics.hpp index 4180bf6eb7..9286c68454 100644 --- a/include/emp/Evolve/Systematics.hpp +++ b/include/emp/Evolve/Systematics.hpp @@ -2385,7 +2385,9 @@ namespace emp { // Adjust total offspring if (adjust_total_offspring) { for (auto tax : active_taxa) { - tax->parent->AddTotalOffspring(); + if (tax->parent) { + tax->parent->AddTotalOffspring(); + } } } else { total_offspring_wrong = true;