mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-18 03:08:46 -05:00
libobs: Fix possible use-after-free of obs_scene_t
When creating a group, a newly allocated group `sub_scene` is released just after calling `obs_scene_add_internal`. If another thread released the scene-item, which is the sub_scene, use-after-free might happen.
This commit is contained in:
@@ -354,6 +354,6 @@ void OBSBasicTransform::OnSceneChanged(QListWidgetItem *current,
|
||||
if (!current)
|
||||
return;
|
||||
|
||||
obs_scene_t *scene = GetOBSRef<OBSScene>(current);
|
||||
OBSScene scene = GetOBSRef<OBSScene>(current);
|
||||
this->SetScene(scene);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user