diff --git a/tools/lsp.c b/tools/lsp.c index 450df32..71a5103 100644 --- a/tools/lsp.c +++ b/tools/lsp.c @@ -137,7 +137,7 @@ main (int argc, char *argv[]) ports = jack_get_ports (client, NULL, NULL, 0); - for (i = 0; ports[i]; ++i) { + for (i = 0; ports && ports[i]; ++i) { // skip over any that don't match ALL of the strings presented at command line skip_port = 0; for(k=optind; k < argc; k++){