diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-05-01 16:27:22 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-05-01 16:27:22 -0400 |
| commit | b0875e1fa0f13935d6ac06a24dc6300a821f7652 (patch) | |
| tree | 39935ff86ba30ab2d336f7981023e88b65f714f6 /src/stdlib/stdlib.c | |
| parent | 9f7c0786d88f4390e76e058911216988df537a4c (diff) | |
Add check for null type
Diffstat (limited to 'src/stdlib/stdlib.c')
| -rw-r--r-- | src/stdlib/stdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/stdlib.c b/src/stdlib/stdlib.c index 71257b8e..54c7827f 100644 --- a/src/stdlib/stdlib.c +++ b/src/stdlib/stdlib.c @@ -502,7 +502,7 @@ public void end_inspect(const void *expr, const TypeInfo_t *type) { _inspect_depth -= 1; - if (type->metamethods.as_text) { + if (type && type->metamethods.as_text) { Text_t expr_text = generic_as_text(expr, USE_COLOR, type); Text_t type_name = generic_as_text(NULL, false, type); for (int i = 0; i < 3*_inspect_depth; i++) fputc(' ', stdout); |
