From 114e0c89e1234a51c24dd5db117cb030f5a923ea Mon Sep 17 00:00:00 2001 From: Exeldro Date: Tue, 21 Jan 2025 12:44:22 +0100 Subject: [PATCH] Add extra checks --- obs-shaderfilter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/obs-shaderfilter.c b/obs-shaderfilter.c index 9eaa0c96..ccd74bda 100644 --- a/obs-shaderfilter.c +++ b/obs-shaderfilter.c @@ -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); @@ -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) {