summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-17 21:53:31 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-17 21:53:31 +0100
commit54ee872149495524a73deef6e98022887f7e3d6f (patch)
tree90a28dd56412a545b480d0a2b1ccf520c1517257
parentd4071f8f94856c13de826af77e98375e015c7e1f (diff)
downloadODR-AudioEnc-54ee872149495524a73deef6e98022887f7e3d6f.tar.gz
ODR-AudioEnc-54ee872149495524a73deef6e98022887f7e3d6f.tar.bz2
ODR-AudioEnc-54ee872149495524a73deef6e98022887f7e3d6f.zip
Verify that output file can be opened
-rw-r--r--src/mot-encoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mot-encoder.c b/src/mot-encoder.c
index 1fdc58e..e0ba57c 100644
--- a/src/mot-encoder.c
+++ b/src/mot-encoder.c
@@ -191,6 +191,10 @@ int main(int argc, char *argv[])
}
int output_fd = open(output, O_WRONLY);
+ if (output_fd == -1) {
+ perror("Failed to open output");
+ return 3;
+ }
MagickWandGenesis();