1
0
Fork 0

Fixed a bad access bug

This commit is contained in:
Michael Hackstein 2015-08-27 17:26:17 +02:00
parent 771a6d5143
commit d1ac131294
1 changed files with 4 additions and 2 deletions

View File

@ -428,8 +428,11 @@ namespace triagens {
} }
TRI_ASSERT(batchSize > 0); TRI_ASSERT(batchSize > 0);
TRI_doc_mptr_t const* ptr = nullptr; TRI_doc_mptr_t const* ptr = nullptr;
do { while (count < batchSize) {
ptr = document->primaryIndex()->lookupSequential(internalSkip, total); ptr = document->primaryIndex()->lookupSequential(internalSkip, total);
if (ptr == nullptr) {
break;
}
if (skip > 0) { if (skip > 0) {
--skip; --skip;
} }
@ -440,7 +443,6 @@ namespace triagens {
} }
} }
} }
while (ptr != nullptr && count < batchSize);
} }
catch (...) { catch (...) {
this->unlock(trxCollection, TRI_TRANSACTION_READ); this->unlock(trxCollection, TRI_TRANSACTION_READ);