0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

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:
jp9000 2015-08-21 17:45:03 -07:00
parent f29431d8db
commit dd9107dbd8

View File

@ -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;