Assert on add if link is already added.

This commit is contained in:
Emil Segerås 2013-09-29 19:38:17 +02:00
parent a8cb97059a
commit fb7f06f21f

View File

@ -95,6 +95,7 @@ TBLinkList::~TBLinkList()
void TBLinkList::AddFirst(TBLink *link)
{
assert(!link->linklist); // Link is already in some list!
link->linklist = this;
link->next = first;
if (first)
@ -106,6 +107,7 @@ void TBLinkList::AddFirst(TBLink *link)
void TBLinkList::AddLast(TBLink *link)
{
assert(!link->linklist); // Link is already in some list!
link->linklist = this;
link->prev = last;
if (last)