From 7cc5b47ea01165b77abc78488d61e76c8e129888 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 May 2011 14:27:51 +0000 Subject: Fix crash when input is missing git-svn-id: http://svn.drobilla.net/sord/trunk@127 3d64ff67-21c5-427c-a301-fe4f08042e5a --- src/sordi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/sordi.c b/src/sordi.c index 8843162..7681878 100644 --- a/src/sordi.c +++ b/src/sordi.c @@ -125,6 +125,11 @@ main(int argc, char** argv) } } + if (a == argc) { + fprintf(stderr, "Missing input\n"); + return 1; + } + const uint8_t* input = (const uint8_t*)argv[a++]; if (from_file) { in_name = in_name ? in_name : input; -- cgit v1.2.1