libobs: Finalise source creation before firing signal

Fixes a possible crash when renaming a source during the source_create
signal callback as it has not been added to the hash table yet.
This commit is contained in:
derrod 2023-04-18 21:28:07 +02:00 committed by Jim
parent a4ea51b2b1
commit 3bb101d7a2

View file

@ -409,11 +409,11 @@ obs_source_create_internal(const char *id, const char *name, const char *uuid,
source->flags = source->default_flags;
source->enabled = true;
obs_source_init_finalize(source);
if (!private) {
obs_source_dosignal(source, "source_create", NULL);
}
obs_source_init_finalize(source);
return source;
fail: