Skip to content

Commit 388090c

Browse files
committed
Fix segfault bug in connection.c
1 parent 54a5fd4 commit 388090c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_sqlite/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ pysqlite_connection_cursor_impl(pysqlite_Connection *self, PyObject *factory)
549549
return NULL;
550550
}
551551

552-
if (cursor && self->row_factory != Py_None) {
552+
if (cursor && self->row_factory && self->row_factory != Py_None) {
553553
Py_INCREF(self->row_factory);
554554
Py_XSETREF(((pysqlite_Cursor *)cursor)->row_factory, self->row_factory);
555555
}

0 commit comments

Comments
 (0)