libobs: Don't return valid obs_data if json fails
If obs_data_create_from_json fails on loading the json data, do not return a valid data object; return NULL instead.
This commit is contained in:
parent
f29431d8db
commit
dd9107dbd8
@ -635,6 +635,8 @@ obs_data_t *obs_data_create_from_json(const char *json_string)
|
||||
blog(LOG_ERROR, "obs-data.c: [obs_data_create_from_json] "
|
||||
"Failed reading json string (%d): %s",
|
||||
error.line, error.text);
|
||||
obs_data_release(data);
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user