UI: Fix cast of pointer type at invalid current scene setting on load

This commit is contained in:
Norihiro Kamae
2024-07-20 10:17:43 +09:00
committed by Lain
parent c5a01b7df4
commit 2fa77c4021

View File

@@ -1293,10 +1293,8 @@ 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);
*static_cast<OBSSourceAutoRelease *>(source_ptr) =
obs_source_get_ref(scene);
return false;
};
obs_enum_scenes(find_scene_cb, &curScene);