forked from GitHub/gf-core
Add null check before freeing DB
Was causing segfaults in load-failure tests
This commit is contained in:
@@ -13,7 +13,8 @@
|
|||||||
static void
|
static void
|
||||||
PGF_dealloc(PGFObject *self)
|
PGF_dealloc(PGFObject *self)
|
||||||
{
|
{
|
||||||
pgf_free_revision(self->db, self->revision);
|
if (self->db != NULL && self->revision != 0)
|
||||||
|
pgf_free_revision(self->db, self->revision);
|
||||||
Py_TYPE(self)->tp_free((PyObject *)self);
|
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user