libobs: Handle removed plugins for versioned sources
When someone adds a source and the plugin is removed for whatever reason, it would cause a crash with the new source versioning system. This fixes that by ensuring the unversioned id is also backed up along with the normal id.
This commit is contained in:
@@ -1839,6 +1839,10 @@ static obs_source_t *obs_load_source_type(obs_data_t *source_data)
|
||||
|
||||
source = obs_source_create_set_last_ver(v_id, name, settings, hotkeys,
|
||||
prev_ver);
|
||||
if (source->owns_info_id) {
|
||||
bfree((void *)source->info.unversioned_id);
|
||||
source->info.unversioned_id = bstrdup(id);
|
||||
}
|
||||
|
||||
obs_data_release(hotkeys);
|
||||
|
||||
|
Reference in New Issue
Block a user