forgot to lock the mutex when destroying a scene item

This commit is contained in:
jp9000 2014-01-01 10:28:37 -07:00
parent 966c091078
commit 1c91e0d0e0
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

@ -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;
};