summaryrefslogtreecommitdiff
path: root/src/preproc/grn
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-04-15 08:32:44 +1000
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-04-16 16:59:38 +1000
commit646539bc119e7dd838851deb77877c64d82241e7 (patch)
tree22ac39535616b816112a4b558cad1bd0b54fc0fe /src/preproc/grn
parent0e84b1acbe52ebf055130a5af47bdf8092f8e530 (diff)
downloadgroff-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.cpp4
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);