1
0
Fork 0

prevent crashes

This commit is contained in:
Jan Steemann 2014-08-07 17:02:07 +02:00
parent c7350c4c06
commit 253fd6f2bc
1 changed files with 5 additions and 3 deletions

View File

@ -205,9 +205,11 @@ QueryResult Query::execute () {
while (nullptr != (value = root->getOne())) {
AqlValue val = value->getValue(0, 0);
TRI_ASSERT(! val.isEmpty());
auto doc = value->getDocumentCollection(0);
json.add(val.toJson(doc));
if (! val.isEmpty()) {
auto doc = value->getDocumentCollection(0);
json.add(val.toJson(doc));
}
delete value;
}