Browse Source

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.
gxalpha 3 years ago
parent
commit
3a67fe5944
1 changed files with 1 additions and 1 deletions
  1. 1 1
      UI/window-basic-main.cpp

+ 1 - 1
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)
 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));
 	sources->push_back(obs_sceneitem_get_source(item));
 	return true;
 	return true;
 }
 }