Skip to content

Commit

Permalink
Add extra checks
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Jan 21, 2025
1 parent 59af0da commit 114e0c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion obs-shaderfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ static void shader_filter_reload_effect(struct shader_filter_data *filter)
size_t effect_count = gs_effect_get_num_params(filter->effect);
for (size_t effect_index = 0; effect_index < effect_count; effect_index++) {
gs_eparam_t *param = gs_effect_get_param_by_idx(filter->effect, effect_index);

if (!param)
continue;
struct gs_effect_param_info info;
gs_effect_get_param_info(param, &info);

Expand Down Expand Up @@ -2751,6 +2752,8 @@ void shader_filter_set_effect_params(struct shader_filter_data *filter)
size_t param_count = filter->stored_param_list.num;
for (size_t param_index = 0; param_index < param_count; param_index++) {
struct effect_param_data *param = (filter->stored_param_list.array + param_index);
if (!param->param)
continue;
obs_source_t *source = NULL;

switch (param->type) {
Expand Down

0 comments on commit 114e0c8

Please sign in to comment.