Remove unnecessary context initialization code
There was no need to call the context free function in the initialization function, and it's safer to just initialize the memory to 0 before using (which also negates the need for da_init)
This commit is contained in:
parent
87475cdf89
commit
d4cf9db638
@ -1188,10 +1188,9 @@ static inline bool obs_context_data_init_wrap(
|
||||
const char *name)
|
||||
{
|
||||
assert(context);
|
||||
memset(context, 0, sizeof(*context));
|
||||
|
||||
pthread_mutex_init_value(&context->rename_cache_mutex);
|
||||
obs_context_data_free(context);
|
||||
|
||||
if (pthread_mutex_init(&context->rename_cache_mutex, NULL) < 0)
|
||||
return false;
|
||||
|
||||
@ -1205,8 +1204,6 @@ static inline bool obs_context_data_init_wrap(
|
||||
|
||||
context->name = dup_name(name);
|
||||
context->settings = obs_data_newref(settings);
|
||||
|
||||
da_init(context->rename_cache);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user