Skip to content

Commit

Permalink
Fix nullptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Feb 24, 2025
1 parent 344eb6c commit d0d5cf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0d5cf8

Please # to comment.