mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix nullptr check
This commit is contained in:
@@ -2087,6 +2087,9 @@ gb_internal bool is_type_sliceable(Type *t) {
|
|||||||
|
|
||||||
gb_internal Entity *type_get_polymorphic_parent(Type *t, Type **params_) {
|
gb_internal Entity *type_get_polymorphic_parent(Type *t, Type **params_) {
|
||||||
t = base_type(t);
|
t = base_type(t);
|
||||||
|
if (t == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
Type *parent = nullptr;
|
Type *parent = nullptr;
|
||||||
if (t->kind == Type_Struct) {
|
if (t->kind == Type_Struct) {
|
||||||
parent = t->Struct.polymorphic_parent;
|
parent = t->Struct.polymorphic_parent;
|
||||||
|
|||||||
Reference in New Issue
Block a user