mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
forgot to lock the mutex when destroying a scene item
This commit is contained in:
parent
966c091078
commit
1c91e0d0e0
|
@ -263,7 +263,10 @@ int obs_sceneitem_destroy(obs_sceneitem_t item)
|
|||
int ref = 0;
|
||||
|
||||
if (item) {
|
||||
pthread_mutex_lock(&item->parent->mutex);
|
||||
detach_sceneitem(item);
|
||||
pthread_mutex_unlock(&item->parent->mutex);
|
||||
|
||||
if (item->source)
|
||||
ref = obs_source_release(item->source);
|
||||
bfree(item);
|
||||
|
|
|
@ -32,7 +32,7 @@ struct obs_scene_item {
|
|||
struct vec2 scale;
|
||||
float rot;
|
||||
|
||||
/* would do **prev_next, but not really great for resorting */
|
||||
/* would do **prev_next, but not really great for reordering */
|
||||
struct obs_scene_item *prev;
|
||||
struct obs_scene_item *next;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue