From 3a67fe59442633399fdfcebfc296002cbc602571 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Fri, 24 Dec 2021 12:42:37 +0100 Subject: [PATCH] UI: Hold refs to old sources during remove source undo Fixes an issue where sources could get released and destroyed when undoing the removal of a nested scene. --- UI/window-basic-main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 0517ae255..7d63c3083 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -5740,7 +5740,7 @@ OBSData OBSBasic::BackupScene(obs_scene_t *scene, static bool add_source_enum(obs_scene_t *, obs_sceneitem_t *item, void *p) { - auto sources = static_cast *>(p); + auto sources = static_cast *>(p); sources->push_back(obs_sceneitem_get_source(item)); return true; }