From ba4a5af3891526926e4999737c3180873602d2c3 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Wed, 7 Dec 2016 13:05:24 +0100 Subject: [PATCH] fixed GH #1461: Poco::Data::SQLite::SQLiteStatementImpl::next() error --- Data/SQLite/src/SQLiteStatementImpl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {