diff --git a/avida-core/source/main/cDeme.cc b/avida-core/source/main/cDeme.cc index 6887c5b20..371bcc5a5 100644 --- a/avida-core/source/main/cDeme.cc +++ b/avida-core/source/main/cDeme.cc @@ -351,7 +351,10 @@ int cDeme::GetNumParasites() const } void cDeme::UpdateParasiteMemoryScore(const double decay) { - if (GetSize() == 0) return; + if (GetSize() == 0) { + SetParasiteMemoryScore(0.0); + return; + } const double inc = static_cast(GetNumParasites()) / GetSize(); SetParasiteMemoryScore(GetParasiteMemoryScore() * decay + inc); }