aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-06-02 13:21:19 +0200
committerThomas White <taw@physics.org>2023-06-02 13:21:19 +0200
commit3057bd3ed568fa0bdaa7c0ddf0ea0dbbff532bf3 (patch)
treec1f6f2d52db0ed0fcf6f6b9a7d6f5d7128fb0010 /src
parent364ddd32e7e53540d7c41420df9fe877784a0bac (diff)
Avoid strcmp(..., NULL)
Diffstat (limited to 'src')
-rw-r--r--src/im-asapo.c4
1 files changed, 3 insertions, 1 deletions
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;
}