diff --git a/luna/include/luna/LinkedList.h b/luna/include/luna/LinkedList.h index aeb5a695..50615134 100644 --- a/luna/include/luna/LinkedList.h +++ b/luna/include/luna/LinkedList.h @@ -85,6 +85,7 @@ template class DoublyLinkedList void prepend(T* ptr) { Node* const node = extract_node(ptr); + if (!m_end_node) m_end_node = node; if (m_start_node) node->prepend_to_list(m_start_node); else {