From 31ceec04ceae19a5916b04df64ae9fe2688e77c0 Mon Sep 17 00:00:00 2001 From: Palana Date: Wed, 29 Jan 2014 22:54:05 +0100 Subject: [PATCH] Lock graphics before trying to remove a scene item Prevents another deadlock if removing the scene item triggers source cleanup of a source with graphics resources --- obs/window-basic-main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 910f579a5..bcd25411e 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -519,6 +519,7 @@ void OBSBasic::on_actionRemoveSource_triggered() if (!scene) return; + gs_entercontext(obs_graphics()); obs_scene_addref(scene); QVariant userData = sel->data(Qt::UserRole); @@ -526,6 +527,7 @@ void OBSBasic::on_actionRemoveSource_triggered() obs_sceneitem_destroy(scene, item); obs_scene_release(scene); + gs_leavecontext(); } void OBSBasic::on_actionSourceProperties_triggered()