1
0
Fork 0

Merge branch 'aql2' of github.com:triAGENS/ArangoDB into aql2

This commit is contained in:
Willi Goesgens 2014-09-08 15:39:26 +02:00
commit 295d2747e9
1 changed files with 11 additions and 2 deletions

View File

@ -116,8 +116,17 @@ AqlValue AqlValue::clone () const {
case DOCVEC: {
auto c = new std::vector<AqlItemBlock*>;
c->reserve(_vector->size());
for (auto it = _vector->begin(); it != _vector->end(); ++it) {
c->push_back((*it)->slice(0, (*it)->size()));
try {
for (auto it = _vector->begin(); it != _vector->end(); ++it) {
c->push_back((*it)->slice(0, (*it)->size()));
}
}
catch (...) {
for (auto x : *c) {
delete x;
}
delete c;
throw;
}
return AqlValue(c);
}