summaryrefslogtreecommitdiff
path: root/src/nodecache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodecache.h')
-rw-r--r--src/nodecache.h2
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;
}
contact: Jan Huwald // Impressum