Proposed fix for node clear in unlink_after(TLink& node)

This commit is contained in:
jwellbelove 2016-06-22 08:43:23 +01:00
parent 554c4a7e56
commit 64cdbcd5ea

View File

@ -289,12 +289,13 @@ namespace etl
{
if (node.etl_next != nullptr)
{
node.etl_next = node.etl_next->etl_next;
TLink* old_next = node.etl_next;
node.etl_next = old_next->etl_next;
if ((int(TLink::OPTION) == etl::link_option::AUTO) ||
(int(TLink::OPTION) == etl::link_option::CHECKED))
{
node.clear();
old_next.clear();
}
}
}