mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Fix potential crash for sources of unkown type
This can happen if a source was created but the corresponding functionality was later removed (e.g. when loading a scene collection containing a browser source on an OBS build without browser source support)
This commit is contained in:
@@ -36,7 +36,7 @@ static bool visibilitySourceTypeEnum(obs_scene_t *, obs_sceneitem_t *item,
|
||||
|
||||
auto sourceTypeName = obs_source_get_display_name(
|
||||
obs_source_get_id(obs_sceneitem_get_source(item)));
|
||||
if (vInfo->name == sourceTypeName) {
|
||||
if (sourceTypeName && vInfo->name == sourceTypeName) {
|
||||
obs_sceneitem_set_visible(item, vInfo->visible);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user