From adb2d73da34927b450a95612cd6487867a77dd66 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 17 Mar 2010 20:21:54 +0100 Subject: bugfix: only resize if needed, else nodes get deleted diff --git a/src/nodecache.h b/src/nodecache.h index c5a5524..943f904 100644 --- a/src/nodecache.h +++ b/src/nodecache.h @@ -17,7 +17,7 @@ public: } void insert(const class AbstractNode &node, const T & value) { - this->cache.resize(node.index() + 1); + if (this->cache.size() <= node.index()) this->cache.resize(node.index() + 1); this->cache[node.index()] = value; } -- cgit v0.10.1