diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx index e97abc60d..0243ce737 100644 --- a/src/util/IntrusiveList.hxx +++ b/src/util/IntrusiveList.hxx @@ -319,8 +319,10 @@ public: return {&t}; } - void erase(iterator i) noexcept { + iterator erase(iterator i) noexcept { + auto result = std::next(i); ToHook(*i).unlink(); + return result; } void push_front(T &t) noexcept {