diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-02-28 18:48:36 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-02-28 18:48:36 -0500 |
| commit | afed6362523f05b0656a75c4bbcecbb9618c5a61 (patch) | |
| tree | 16587f3bfbbdafbfb3787df5b8d7d6ed07d21b0c /stdlib | |
| parent | 39e169d5b4171487c5348b981a8574fd98b49ed0 (diff) | |
Handle case where file can't be found
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/stdlib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index 8e10f40e..cc549899 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -403,6 +403,7 @@ static void print_stack_line(FILE *out, OptionalText_t fn_name, const char *file fprintf(out, "\n"); FILE *f = fopen(filename, "r"); + if (!f) return; char *line = NULL; size_t size = 0; ssize_t nread; |
