From a3aa8a339c30de71de63d22a6141410c15cf251d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Dec 2013 04:22:56 +0000 Subject: Fix crash when no control command line options are given. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5217 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jalv.c b/src/jalv.c index c1da3c5..ca3d7bf 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -1140,8 +1140,10 @@ main(int argc, char** argv) jalv_apply_state(&jalv, state); } - for (char** c = jalv.opts.controls; *c; ++c) { - jalv_apply_control_arg(&jalv, *c); + if (jalv.opts.controls) { + for (char** c = jalv.opts.controls; *c; ++c) { + jalv_apply_control_arg(&jalv, *c); + } } /* Set Jack callbacks */ -- cgit v1.2.1