diff --git a/Data/SQLite/src/SQLiteStatementImpl.cpp b/Data/SQLite/src/SQLiteStatementImpl.cpp index dc6c3778e..ab0690d72 100644 --- a/Data/SQLite/src/SQLiteStatementImpl.cpp +++ b/Data/SQLite/src/SQLiteStatementImpl.cpp @@ -273,7 +273,10 @@ std::size_t SQLiteStatementImpl::next() } _stepCalled = false; if (_affectedRowCount == POCO_SQLITE_INV_ROW_CNT) _affectedRowCount = 0; - _affectedRowCount += (*extracts.begin())->numOfRowsHandled(); + if (extracts.begin() != extracts.end()) + { + _affectedRowCount += (*extracts.begin())->numOfRowsHandled(); + } } else if (SQLITE_DONE == _nextResponse) {