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.
This commit is contained in:
gxalpha 2021-12-24 12:42:37 +01:00 committed by Jim
parent 8629d6a028
commit 3a67fe5944

View file

@ -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<std::vector<obs_source_t *> *>(p);
auto sources = static_cast<std::vector<OBSSource> *>(p);
sources->push_back(obs_sceneitem_get_source(item));
return true;
}