From f26cb706c2a7cd2a48d0b8b62ad45e42803d4dd2 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 30 Jan 2014 12:35:21 -0700 Subject: [PATCH] Clean up the previous commit a bit The was_removed variable was rather unnecessary --- libobs/obs-scene.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libobs/obs-scene.c b/libobs/obs-scene.c index 96f995433..f40d9c53d 100644 --- a/libobs/obs-scene.c +++ b/libobs/obs-scene.c @@ -331,7 +331,6 @@ int obs_sceneitem_release(obs_sceneitem_t item) void obs_sceneitem_remove(obs_sceneitem_t item) { obs_scene_t scene; - bool was_removed; if (!item) return; @@ -341,15 +340,14 @@ void obs_sceneitem_remove(obs_sceneitem_t item) if (scene) pthread_mutex_lock(&scene->mutex); - was_removed = item->removed; - item->removed = true; - - if (was_removed) { + if (item->removed) { if (scene) pthread_mutex_unlock(&scene->mutex); return; } + item->removed = true; + signal_item_remove(item); detach_sceneitem(item);