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.
@@ -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));