util/IntrusiveList: add missing initializer to insert_after()
We must not call std::next() if the list head was not yet initialized. This was missing in commit 70654259270fdaae2906fb9fe4f34c6e3a740c37
This commit is contained in:
parent
c391adad10
commit
44f55e1866
@ -538,6 +538,10 @@ public:
|
||||
* Like insert(), but insert after the given position.
|
||||
*/
|
||||
void insert_after(iterator p, reference t) noexcept {
|
||||
if constexpr (options.zero_initialized)
|
||||
if (head.next == nullptr)
|
||||
head = {&head, &head};
|
||||
|
||||
insert(std::next(p), t);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user