From 3d139c988884155dac3daa7eebed2e0053d3bead Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Sun, 13 Nov 2011 21:52:13 +0000 Subject: [PATCH] emotion: no segv when no webcam has been detected. SVN revision: 65137 --- legacy/emotion/src/lib/emotion_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/legacy/emotion/src/lib/emotion_main.c b/legacy/emotion/src/lib/emotion_main.c index 54748f0..d7d6902 100644 --- a/legacy/emotion/src/lib/emotion_main.c +++ b/legacy/emotion/src/lib/emotion_main.c @@ -406,9 +406,12 @@ emotion_webcam_custom_get(const char *device) const Emotion_Webcam *ew; const Eina_List *l; - EINA_LIST_FOREACH(_emotion_webcams->webcams, l, ew) - if (ew->device && strcmp(device, ew->device) == 0) - return ew->custom; + if (_emotion_webcams) + { + EINA_LIST_FOREACH(_emotion_webcams->webcams, l, ew) + if (ew->device && strcmp(device, ew->device) == 0) + return ew->custom; + } return NULL; } -- 2.7.4