@@ -189,18 +189,23 @@ @end @implementation PGResultRowObjectEnumerator - (id)nextObject { + id object; + if (_pos >= _count) return nil; while (_pos < _count && PQgetisnull(_res, _row, _pos)) _pos++; if (_pos >= _count) return nil; - return convertType(_res, _pos, - [OFString stringWithUTF8String: PQgetvalue(_res, _row, _pos++)]); + object = convertType(_res, _pos, + [OFString stringWithUTF8String: PQgetvalue(_res, _row, _pos)]); + _pos++; + + return object; } @end