libobs: Fix possible null pointer dereference

master
Michael Fabian Dirks 2016-08-02 15:06:36 +02:00
parent 4f3fc21a20
commit 99b0acf4f0
1 changed files with 2 additions and 1 deletions

View File

@ -585,7 +585,8 @@ bool obs_property_button_clicked(obs_property_t *p, void *obj)
struct button_data *data = get_type_data(p,
OBS_PROPERTY_BUTTON);
if (data && data->callback)
return data->callback(p->parent, p, context->data);
return data->callback(p->parent, p,
(context ? context->data : NULL));
}
return false;