mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Add null check before freeing DB
Was causing segfaults in load-failure tests
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
static void
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user