mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 15:49:51 +08:00
forgot to lock the mutex when destroying a scene item
This commit is contained in:
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user