diff --git a/src/autowiring/AutoPacket.cpp b/src/autowiring/AutoPacket.cpp index 3b877d6f4..c2e70189d 100644 --- a/src/autowiring/AutoPacket.cpp +++ b/src/autowiring/AutoPacket.cpp @@ -175,10 +175,16 @@ void AutoPacket::Initialize(void) { decoration.second.Reset(); } - // Call all subscribers with no required or optional arguments: + // Find all subscribers with no required or optional arguments: + std::list callCounters; for (auto& satCounter : m_satCounters) if (satCounter) - satCounter.CallAutoFilter(*this); + callCounters.push_back(&satCounter); + + // Call all subscribers with no required or optional arguments: + // NOTE: This may result in decorations that cause other subscribers to be called. + for (auto* call : callCounters) + call->CallAutoFilter(*this); // Initial satisfaction of the AutoPacket: UpdateSatisfaction(typeid(AutoPacket));