diff options
author | Marius Kintel <marius@kintel.net> | 2010-03-17 19:21:54 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:34 (GMT) |
commit | adb2d73da34927b450a95612cd6487867a77dd66 (patch) | |
tree | 4ec09575cc27d283c2049ef3cec8ab92f17e8e5c /src/nodecache.h | |
parent | 75cd0f291af8e1fd8e27cc649bf40bf291bb40f7 (diff) |
bugfix: only resize if needed, else nodes get deleted
Diffstat (limited to 'src/nodecache.h')
-rw-r--r-- | src/nodecache.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |