libobs: Call destroy signal after waiting

No real reason to have it above. Any other sources will still wait
anyway, so just makes things a bit more consistent.
This commit is contained in:
jp9000 2022-01-04 13:16:21 -08:00
parent da5fc10a8b
commit 7fa07afd21

View File

@ -653,12 +653,12 @@ static void obs_source_destroy_defer(struct obs_source *source)
{
size_t i;
obs_source_dosignal(source, "source_destroy", "destroy");
/* prevents the destruction of sources if destroy triggered inside of
* a video tick call */
obs_context_wait(&source->context);
obs_source_dosignal(source, "source_destroy", "destroy");
if (source->context.data) {
source->info.destroy(source->context.data);
source->context.data = NULL;