Unset class bases when doing final free so we don't access potentially-freed subclass tables

This commit is contained in:
K. Lange 2022-05-27 00:15:55 +09:00
parent 1ac8f296b2
commit 32b3af58cc

View File

@ -284,6 +284,9 @@ void krk_freeObjects() {
while (other) {
KrkObj * next = other->next;
if (other->type == KRK_OBJ_CLASS) {
((KrkClass*)other)->base = NULL;
}
freeObject(other);
other = next;
}