ladspa-sink: fix incorrect error conditions

fix codes to prevent null pointer dereference of cdata variable.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
This commit is contained in:
Sangchul Lee 2018-05-04 02:00:26 +09:00 committed by Tanu Kaskinen
parent ae843808bc
commit 66e8ec3453

View file

@ -718,7 +718,7 @@ static int parse_control_parameters(struct userdata *u, const char *cdata, doubl
pa_log_debug("Trying to read %lu control values", u->n_control); pa_log_debug("Trying to read %lu control values", u->n_control);
if (!cdata && u->n_control > 0) if (!cdata || u->n_control == 0)
return -1; return -1;
pa_log_debug("cdata: '%s'", cdata); pa_log_debug("cdata: '%s'", cdata);