Commit a269762f authored by Gerhard Häring's avatar Gerhard Häring

Fix for Issue2515: Don't crash when trying to fetch data from a closed cursor.

parent f122902f
......@@ -851,6 +851,7 @@ PyObject* cursor_iternext(Cursor *self)
next_row = next_row_tuple;
}
if (self->statement) {
rc = _sqlite_step_with_busyhandler(self->statement->st, self->connection);
if (rc != SQLITE_DONE && rc != SQLITE_ROW) {
Py_DECREF(next_row);
......@@ -861,6 +862,7 @@ PyObject* cursor_iternext(Cursor *self)
if (rc == SQLITE_ROW) {
self->next_row = _fetch_one_row(self);
}
}
return next_row;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment