From 2fa77c402149c0bb797b5838e5fc6a7391e6a86d Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Sat, 20 Jul 2024 10:17:43 +0900 Subject: [PATCH] UI: Fix cast of pointer type at invalid current scene setting on load --- UI/window-basic-main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 20e2d01a7..5c05f4141 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -1293,10 +1293,8 @@ retryScene: if (!curScene) { auto find_scene_cb = [](void *source_ptr, obs_source_t *scene) { - OBSSourceAutoRelease &source = - reinterpret_cast( - source_ptr); - source = obs_source_get_ref(scene); + *static_cast(source_ptr) = + obs_source_get_ref(scene); return false; }; obs_enum_scenes(find_scene_cb, &curScene);