diff --git a/VTIL-Common/util/detached_queue.hpp b/VTIL-Common/util/detached_queue.hpp index 1f46dd2..cc22af0 100644 --- a/VTIL-Common/util/detached_queue.hpp +++ b/VTIL-Common/util/detached_queue.hpp @@ -146,7 +146,7 @@ namespace vtil k->prev = nullptr; k->next = head; - if ( head ) head->prev = k; + if ( head && head != key::invalid_value) head->prev = k; if ( !tail ) tail = k; head = k; list_size++;