Skip to content

Commit da97bef

Browse files
Fix unchecked error in compiler_findmethodreturntype
1 parent 0798807 commit da97bef

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/core/compile.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,8 +2346,7 @@ bool compiler_findmethodreturntype(value klass, char *label, value *type) {
23462346
value method = MORPHO_NIL;
23472347
if (dictionary_get(&MORPHO_GETCLASS(klass)->methods, MORPHO_OBJECT(&selector), &method)) {
23482348
signature *s = metafunction_getsignature(method);
2349-
*type = signature_getreturntype(s);
2350-
return true;
2349+
if (s) { *type = signature_getreturntype(s); return true; }
23512350
}
23522351

23532352
return false;

0 commit comments

Comments
 (0)