mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Don't std::move main in SetUndoProperties
main is used later in the function, making this undefined behavior. Though we can move the scene_name string. Detected by PVS Studio.
This commit is contained in:
parent
288dfd2660
commit
a781f4a887
|
@ -56,8 +56,8 @@ void SourceToolbar::SetUndoProperties(obs_source_t *source, bool repeatable)
|
|||
if (!currentSceneSource)
|
||||
return;
|
||||
std::string scene_name = obs_source_get_name(currentSceneSource);
|
||||
auto undo_redo = [scene_name,
|
||||
main = std::move(main)](const std::string &data) {
|
||||
auto undo_redo = [scene_name = std::move(scene_name),
|
||||
main](const std::string &data) {
|
||||
OBSDataAutoRelease settings =
|
||||
obs_data_create_from_json(data.c_str());
|
||||
OBSSourceAutoRelease source = obs_get_source_by_name(
|
||||
|
|
Loading…
Reference in a new issue