diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-22 14:03:07 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-22 19:53:03 +0100 |
commit | 239ebbbc2c7c6373ab7582340979cefa1a25b685 (patch) | |
tree | 050e1f7ff5f522c25944fd44d79ccef32742642c /src/lib/emotion/emotion_webcam.c | |
parent | 456419f468e8bba03bc0fcfd9ef2abb2eb61e52e (diff) | |
download | efl-239ebbbc2c7c6373ab7582340979cefa1a25b685.tar.gz |
emotion - webcam fix deletion of webcam still left in webcam list
we may destroy webcams but leave them in the list. this fixes that by
removing them from our global list when we do unref to 0.
@fix
Diffstat (limited to 'src/lib/emotion/emotion_webcam.c')
-rw-r--r-- | src/lib/emotion/emotion_webcam.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c index 1e1db06d97..d29110aa23 100644 --- a/src/lib/emotion/emotion_webcam.c +++ b/src/lib/emotion/emotion_webcam.c @@ -185,7 +185,12 @@ _emotion_webcam_remove_cb(void *user_data, void *func_data EINA_UNUSED) webcam = user_data; EINA_REFCOUNT_UNREF(webcam) - emotion_webcam_destroy(webcam); + { + if (_emotion_webcams) + _emotion_webcams->webcams = + eina_list_remove(_emotion_webcams->webcams, webcam); + emotion_webcam_destroy(webcam); + } } static Eina_Bool |