elementary: don't crash on NULL filename in elm_video.
authorCedric BAIL <cedric.bail@free.fr>
Sun, 17 Jun 2012 02:45:12 +0000 (02:45 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Sun, 17 Jun 2012 02:45:12 +0000 (02:45 +0000)
NOTE: I don't know when this bug was introduced.

SVN revision: 72260

src/lib/elm_video.c

index 1368f65..beee7c9 100644 (file)
@@ -369,7 +369,7 @@ elm_video_file_set(Evas_Object *obj,
    sd->stop = EINA_FALSE;
    if (!emotion_object_file_set(sd->emotion, filename)) return EINA_FALSE;
 
-   if ((!strncmp(filename, "file://", 7)) || (!strstr(filename, "://")))
+   if (filename && ((!strncmp(filename, "file://", 7)) || (!strstr(filename, "://"))))
      emotion_object_last_position_load(sd->emotion);
 
    elm_layout_signal_emit(obj, "elm,video,load", "elm");