summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/spons.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/spons.c b/src/spons.c
index 3dcebbc..f59bd25 100644
--- a/src/spons.c
+++ b/src/spons.c
@@ -51,6 +51,10 @@ int entry_spons(int argc, char **argv) {
FILE *file = stdout;
if (*args != NULL) {
file = fopen(*args, a ? "a" : "w");
+ if (!file) {
+ fprintf(stderr, "spons: Kan doelbestand niet openen\n");
+ return 1;
+ }
}
struct filebuf *fb = stream_to_filebuf(stdin, O_NOALLOWMAP);