From: Francesco Chemolli Date: Fri, 2 Jan 2015 10:00:35 +0000 (+0100) Subject: Fixed Splay::insert X-Git-Tag: merge-candidate-3-v1~384^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=006b562c49414fedca3dd57e6d69db7e5d56bbbd;p=thirdparty%2Fsquid.git Fixed Splay::insert --- diff --git a/include/splay.h b/include/splay.h index 78093798bd..d6bfe3ebab 100644 --- a/include/splay.h +++ b/include/splay.h @@ -318,7 +318,10 @@ void Splay::insert(Value const &value, SPLAYCMP *compare) { assert (!find (value, compare)); - head = head->insert(value, compare); + if (head == NULL) + head = new SplayNode(value); + else + head = head->insert(value, compare); ++elements; }