From 88fc249b016fa3176f82f53a4bfbba8d87266ea0 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 10 Feb 2013 22:30:15 -0500 Subject: [PATCH] examples/utils.c: exit if an output file could not be opened --- examples/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/utils.c b/examples/utils.c index 16c321cb..246d9b43 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -209,6 +209,10 @@ examples_common_init (int argc, char **argv) samplerate = aubio_source_get_samplerate(this_source); if (sink_uri != NULL) { this_sink = new_aubio_sink ((char_t*)sink_uri, samplerate); + if (this_sink == NULL) { + outmsg ("Could not open output file %s.\n", sink_uri); + exit (1); + } } } #ifdef HAVE_LASH -- 2.11.0