diff --git a/luna/include/luna/LinkedList.h b/luna/include/luna/LinkedList.h index 081dec8e..e6056a19 100644 --- a/luna/include/luna/LinkedList.h +++ b/luna/include/luna/LinkedList.h @@ -40,6 +40,8 @@ template class DoublyLinkedList DoublyLinkedListNode* node = (DoublyLinkedListNode*)ptr; if (!m_start_node) m_start_node = node; if (m_end_node) node->add_to_list(m_end_node); + else + node->m_next_node = node->m_last_node = nullptr; m_end_node = node; m_count++;