UI: Fix multithread-unsafe GetCurrentScene

The function `OBSBasic::GetCurrentScene()` is also called from the
graphics thread and access to a QListWidget object, which is not
multithread-safe.
This commit is contained in:
Norihiro Kamae 2022-06-06 19:19:00 +09:00 • committed by Jim
commit 1c4bc6e735
3 changed files with 10 additions and 2 deletions

View file

@ -735,6 +735,7 @@ void OBSBasic::SetCurrentScene(OBSSource scene, bool force)
if (source == scene) {
ui->scenes->blockSignals(true);
currentScene = itemScene.Get();
ui->scenes->setCurrentItem(item);
ui->scenes->blockSignals(false);
if (api)