Skip to content

Commit b167da6

Browse files
committed
Add sanity check to GetClassPtr
1 parent 29d6d73 commit b167da6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

expr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ GetVarNameForError(AST *expr)
113113
Module *
114114
GetClassPtr(AST *objtype)
115115
{
116+
if (!objtype) return NULL;
116117
objtype = BaseType(objtype);
117118
if (objtype->kind != AST_OBJECT) {
118119
ERROR(objtype, "Internal error, not an object symbol");

0 commit comments

Comments
 (0)