From d0d5cf800eb0dc039c124cc62cea74589b6e2f6c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 24 Feb 2025 15:49:49 +0000 Subject: [PATCH] Fix `nullptr` check --- src/types.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types.cpp b/src/types.cpp index 056737af567..43fe625f2e9 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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;