From 3057bd3ed568fa0bdaa7c0ddf0ea0dbbff532bf3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 2 Jun 2023 13:21:19 +0200 Subject: Avoid strcmp(..., NULL) --- src/im-asapo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/im-asapo.c') diff --git a/src/im-asapo.c b/src/im-asapo.c index 37784bf3..f7851b7b 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -99,7 +99,9 @@ struct im_asapo *im_asapo_connect(struct im_asapo_params *params) ERROR("ASAP::O stream not specified.\n"); return NULL; } - if ( strcmp(params->stream, params->output_stream) == 0 ) { + if ( (params->output_stream != NULL) + && (strcmp(params->stream, params->output_stream) == 0) ) + { ERROR("ASAP::O input and output streams cannot be the same.\n"); return NULL; } -- cgit v1.2.3