From: Paul Brossier Date: Mon, 11 Feb 2013 03:30:15 +0000 (-0500) Subject: examples/utils.c: exit if an output file could not be opened X-Git-Tag: 0.4.0-beta1~335^2 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=88fc249b016fa3176f82f53a4bfbba8d87266ea0;p=aubio.git examples/utils.c: exit if an output file could not be opened --- 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