summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-11-13 21:52:13 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-11-13 21:52:13 +0000
commit3d139c988884155dac3daa7eebed2e0053d3bead (patch)
tree9853e50cf1dacdaf6cbeb7b1335ac1927fe517c5 /legacy/emotion/src/lib/emotion_main.c
parent04541d0f31e6c2d846eb0d8aed91553fb0b801dd (diff)
emotion: no segv when no webcam has been detected.
SVN revision: 65137
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/legacy/emotion/src/lib/emotion_main.c b/legacy/emotion/src/lib/emotion_main.c
index 54748f0026..d7d6902444 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)
406 const Emotion_Webcam *ew; 406 const Emotion_Webcam *ew;
407 const Eina_List *l; 407 const Eina_List *l;
408 408
409 EINA_LIST_FOREACH(_emotion_webcams->webcams, l, ew) 409 if (_emotion_webcams)
410 if (ew->device && strcmp(device, ew->device) == 0) 410 {
411 return ew->custom; 411 EINA_LIST_FOREACH(_emotion_webcams->webcams, l, ew)
412 if (ew->device && strcmp(device, ew->device) == 0)
413 return ew->custom;
414 }
412 415
413 return NULL; 416 return NULL;
414} 417}