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:
WarmUpTill 2022-11-20 02:33:25 +01:00 committed by WarmUpTill
parent 624ff9f5c6
commit ae9ef2bf3b

View File

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