libobs: Return NULL if there is no get_properties callback

If there's no get_properties function, return NULL instead of uninitialized memory.
master
Michael Fabian 'Xaymar' Dirks 2019-07-24 15:31:44 +02:00
parent 00298fd4f1
commit 005921c67d
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ obs_properties_t *obs_get_encoder_properties(const char *id)
const struct obs_encoder_info *ei = find_encoder(id);
if (ei && (ei->get_properties || ei->get_properties2)) {
obs_data_t *defaults = get_defaults(ei);
obs_properties_t *properties;
obs_properties_t *properties = NULL;
if (ei->get_properties2) {
properties = ei->get_properties2(NULL, ei->type_data);