Переглянути джерело

libobs: Fix bug when changing filter order

The 'idx' variable is the incorrect variable to be using here, the
variable that was supposed to be used was 'i'.
jp9000 11 роки тому
батько
коміт
4aa8f2d14b
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      libobs/obs-source.c

+ 2 - 1
libobs/obs-source.c

@@ -1384,7 +1384,8 @@ void obs_source_filter_set_order(obs_source_t *source, obs_source_t *filter,
 	/* reorder filter targets, not the nicest way of dealing with things */
 	for (i = 0; i < source->filters.num; i++) {
 		obs_source_t *next_filter = (i == source->filters.num-1) ?
-			source : source->filters.array[idx+1];
+			source : source->filters.array[i + 1];
+
 		source->filters.array[i]->filter_target = next_filter;
 	}
 }