From 08426c8710ed4cd53668c2321b3090f38b490d54 Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Tue, 25 Aug 2020 23:11:30 -0500 Subject: [PATCH] UI: Fix output channels not being deleted Output channel 6 was not being deleted, so use for loop to delete all possible channels. --- UI/window-basic-main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 788721215..2bd62cc93 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -4125,12 +4125,9 @@ void OBSBasic::ClearSceneData() ClearProjectors(); - obs_set_output_source(0, nullptr); - obs_set_output_source(1, nullptr); - obs_set_output_source(2, nullptr); - obs_set_output_source(3, nullptr); - obs_set_output_source(4, nullptr); - obs_set_output_source(5, nullptr); + for (int i = 0; i < MAX_CHANNELS; i++) + obs_set_output_source(i, nullptr); + lastScene = nullptr; swapScene = nullptr; programScene = nullptr;