UI: Fall back in case of invalid scene name on load
This commit is contained in:
parent
0f498133a4
commit
3cc7dc0e7c
1 changed files with 11 additions and 0 deletions
|
|
@ -1211,6 +1211,17 @@ retryScene:
|
|||
goto retryScene;
|
||||
}
|
||||
|
||||
if (!curScene) {
|
||||
auto find_scene_cb = [](void *source_ptr, obs_source_t *scene) {
|
||||
OBSSourceAutoRelease &source =
|
||||
reinterpret_cast<OBSSourceAutoRelease &>(
|
||||
source_ptr);
|
||||
source = obs_source_get_ref(scene);
|
||||
return false;
|
||||
};
|
||||
obs_enum_scenes(find_scene_cb, &curScene);
|
||||
}
|
||||
|
||||
SetCurrentScene(curScene.Get(), true);
|
||||
|
||||
if (!curProgramScene)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue