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:
parent
0959a22de3
commit
434bdc1768
2 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue