mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-29 08:36:18 -04:00
obs-transitions: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the properties of a source, but also of a source type. The latter would pass a NULL pointer for a given source. This adds the necessary change to avoid crashing OBS by passing such a null pointer.
This commit is contained in:
@@ -128,7 +128,6 @@ static void luma_wipe_destroy(void *data)
|
||||
static obs_properties_t *luma_wipe_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
struct luma_wipe_info *lwipe = data;
|
||||
|
||||
obs_property_t *p;
|
||||
|
||||
@@ -136,12 +135,17 @@ static obs_properties_t *luma_wipe_properties(void *data)
|
||||
OBS_COMBO_TYPE_LIST,
|
||||
OBS_COMBO_FORMAT_STRING);
|
||||
|
||||
obs_data_item_t *item = obs_data_first(lwipe->wipes_list);
|
||||
if (data) {
|
||||
struct luma_wipe_info *lwipe = data;
|
||||
|
||||
for (; item != NULL; obs_data_item_next(&item)) {
|
||||
const char *name = obs_data_item_get_name(item);
|
||||
const char *path = obs_data_item_get_string(item);
|
||||
obs_property_list_add_string(p, obs_module_text(name), path);
|
||||
obs_data_item_t *item = obs_data_first(lwipe->wipes_list);
|
||||
|
||||
for (; item != NULL; obs_data_item_next(&item)) {
|
||||
const char *name = obs_data_item_get_name(item);
|
||||
const char *path = obs_data_item_get_string(item);
|
||||
obs_property_list_add_string(p, obs_module_text(name),
|
||||
path);
|
||||
}
|
||||
}
|
||||
|
||||
obs_properties_add_float(props, S_LUMA_SOFT, T_LUMA_SOFT, 0.0, 1.0,
|
||||
|
||||
Reference in New Issue
Block a user