diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-04-15 08:32:44 +1000 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-04-16 16:59:38 +1000 |
commit | 646539bc119e7dd838851deb77877c64d82241e7 (patch) | |
tree | 22ac39535616b816112a4b558cad1bd0b54fc0fe /src/preproc/grn | |
parent | 0e84b1acbe52ebf055130a5af47bdf8092f8e530 (diff) | |
download | groff-git-646539bc119e7dd838851deb77877c64d82241e7.tar.gz |
[grn]: Emit error when failing to open file.
* src/preproc/grn/main.cpp (conv): Throw an error diagnostic when
failing to open a Gremlin picture file.
Diffstat (limited to 'src/preproc/grn')
-rw-r--r-- | src/preproc/grn/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp index c4a57a49f..fcc22896d 100644 --- a/src/preproc/grn/main.cpp +++ b/src/preproc/grn/main.cpp @@ -567,8 +567,10 @@ conv(FILE *fp, } char *path; gfp = macro_path.open_file(gremlinfile, &path); - if (!gfp) + if (0 /* nullptr */ == gfp) { + error("cannot open picture file '%1'", gremlinfile); return; + } PICTURE = DBRead(gfp); /* read picture file */ fclose(gfp); free(path); |