Fix nullptr check

This commit is contained in:
gingerBill
2025-02-24 15:49:49 +00:00
parent 344eb6cb42
commit d0d5cf800e

View File

@@ -2087,6 +2087,9 @@ gb_internal bool is_type_sliceable(Type *t) {
gb_internal Entity *type_get_polymorphic_parent(Type *t, Type **params_) {
t = base_type(t);
if (t == nullptr) {
return nullptr;
}
Type *parent = nullptr;
if (t->kind == Type_Struct) {
parent = t->Struct.polymorphic_parent;