libobs: Unload show/hide transition on load if none

Fixes an issue where a scene item's show/hide transition would stick
around if there was no show/hide transition in the loaded data
This commit is contained in:
Exeldro 2022-03-24 23:33:53 -07:00 committed by Jim
parent 4685276d06
commit 1e242d3630

View File

@ -3768,6 +3768,8 @@ void obs_sceneitem_transition_load(struct obs_scene_item *item,
obs_sceneitem_set_transition(item, show, t);
obs_source_release(t);
obs_data_release(s);
} else {
obs_sceneitem_set_transition(item, show, NULL);
}
obs_sceneitem_set_transition_duration(
item, show, (uint32_t)obs_data_get_int(data, "duration"));