UI: Don't add removed sources when refreshing LoadAudioSources
This can be fired by a callback during source removal. The code was re-adding the source that was just removed, causing the program to freeze when trying to remove all sources.
This commit is contained in:
parent
2a4a46deed
commit
2f0134bf60
@ -2262,7 +2262,8 @@ void OBSBasicSettings::LoadAudioSources()
|
||||
obs_enum_sources(
|
||||
[](void *data, obs_source_t *source) {
|
||||
auto &AddSource = *static_cast<AddSource_t *>(data);
|
||||
AddSource(source);
|
||||
if (!obs_source_removed(source))
|
||||
AddSource(source);
|
||||
return true;
|
||||
},
|
||||
static_cast<void *>(&AddSource));
|
||||
|
Loading…
x
Reference in New Issue
Block a user