From da5108cb6249f25b4db723f7601cbf14bd8b4355 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 7 Oct 2024 07:54:22 +0200 Subject: [PATCH] Fix bug in StaticPool.hxx Incorrect handling when pool is empty --- include/cpp_event_framework/StaticPool.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/cpp_event_framework/StaticPool.hxx b/include/cpp_event_framework/StaticPool.hxx index ab529f6..a64dbdf 100644 --- a/include/cpp_event_framework/StaticPool.hxx +++ b/include/cpp_event_framework/StaticPool.hxx @@ -108,7 +108,10 @@ public: { last_->next = ptr; } - last_ = ptr; + else + { + last_ = ptr; + } fill_level_++; assert(FillLevel() <= NumElements);