datasets: fix null pointer deref

pull/5265/head
Shivani Bhardwaj 5 years ago committed by Victor Julien
parent a8f147d17a
commit c9a637d854

@ -538,7 +538,7 @@ static bool DatasetIsStatic(const char *save, const char *load)
/* A set is static if it does not have any dynamic properties like
* save and/or state defined but has load defined.
* */
if ((load != NULL || strlen(load) > 0) &&
if ((load != NULL && strlen(load) > 0) &&
(save == NULL || strlen(save) == 0)) {
return true;
}

Loading…
Cancel
Save