diff --git a/src/amp_conf.c b/src/amp_conf.c index 481786b3f..d60496412 100644 --- a/src/amp_conf.c +++ b/src/amp_conf.c @@ -683,7 +683,7 @@ int HAMLIB_API amp_set_conf(AMP *amp, hamlib_token_t token, const char *val) { amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!amp || !amp->caps) + if (!amp || !amp->caps || !val) { return -RIG_EINVAL; } diff --git a/src/rot_conf.c b/src/rot_conf.c index 5f204aed7..008a8f048 100644 --- a/src/rot_conf.c +++ b/src/rot_conf.c @@ -748,7 +748,7 @@ int HAMLIB_API rot_set_conf(ROT *rot, hamlib_token_t token, const char *val) { rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!rot || !rot->caps) + if (!rot || !rot->caps || !val) { return -RIG_EINVAL; }