emotion: no segv when no webcam has been detected.

SVN revision: 65137
This commit is contained in:
Cedric BAIL 2011-11-13 21:52:13 +00:00
parent 04541d0f31
commit 3d139c9888
1 changed files with 6 additions and 3 deletions

View File

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