From: Mike Brady Date: Tue, 5 Feb 2019 10:23:24 +0000 (+0000) Subject: Stop a segmentation error if a bsackend has no help routine X-Git-Tag: 3.3RC0~66^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae7856dd27d3cab5aa6942e253e96f27a0b3de1;p=thirdparty%2Fshairport-sync.git Stop a segmentation error if a bsackend has no help routine --- diff --git a/audio.c b/audio.c index 7d0f489f..a2c21287 100644 --- a/audio.c +++ b/audio.c @@ -112,8 +112,12 @@ void audio_ls_outputs(void) { for (out = outputs; *out; out++) { printf("\n"); - printf("Options for output %s:\n", (*out)->name); - (*out)->help(); + if ((*out)->help) { + printf("Options for output %s:\n", (*out)->name); + (*out)->help(); + } else { + printf("No options for output %s:\n", (*out)->name); + } } }