mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-21 05:24:47 -04:00
Fix the design flaw with obs_sceneitem_destroy
The previous commit used the scene as a parameter to check to see if the scene item was still present within the scene before destroying, but this was actually unnecessary because the fault was because the destroy signal was being triggered *before* the scene's mutex locked, thus causing a race condition. I changed the code so that it signals after the lock instead of before, so the scene parameter should no longer be necessary.
This commit is contained in:
1 parent
31ceec04ce
commit
3243a9f8c5
3 files changed
+12
-24
No files matched your search
@@ -524,7 +524,7 @@ void OBSBasic::on_actionRemoveSource_triggered()
|
||||
|
||||
QVariant userData = sel->data(Qt::UserRole);
|
||||
obs_sceneitem_t item = VariantPtr<obs_sceneitem_t>(userData);
|
||||
obs_sceneitem_destroy(scene, item);
|
||||
obs_sceneitem_destroy(item);
|
||||
|
||||
obs_scene_release(scene);
|
||||
gs_leavecontext();
|
||||
|
||||
Reference in new issue
Block a user