LinkedList: Check for nullptrs in detach_from_list()
This commit is contained in:
parent
7e62ee66be
commit
7efb79dd26
@ -41,8 +41,8 @@ template <typename T> class LinkedListNode
|
|||||||
|
|
||||||
void detach_from_list()
|
void detach_from_list()
|
||||||
{
|
{
|
||||||
m_next_node->m_last_node = m_last_node;
|
if (m_next_node) m_next_node->m_last_node = m_last_node;
|
||||||
m_last_node->m_next_node = m_next_node;
|
if (m_last_node) m_last_node->m_next_node = m_next_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void append_to_list(SelfType* end_node)
|
void append_to_list(SelfType* end_node)
|
||||||
|
Loading…
Reference in New Issue
Block a user