albumart: avoid crash if substring is not found

Test case: https://soundcloud.com/audiotonic/audio_tonic_mr_mr_radio_1_2702

Signed-off-by: Eduardo Lima (Etrunko) <eblima@gmail.com>
This commit is contained in:
Eduardo Lima (Etrunko) 2016-03-11 10:03:09 -03:00
parent fae6f88df7
commit 48d9936f9c
1 changed files with 8 additions and 5 deletions

View File

@ -133,6 +133,8 @@ _cb_http_complete(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
if (p)
{
p = strstr(p, "src=\"http");
if (p)
{
p += 5;
pe = strchr(p, '"');
if (pe)
@ -141,6 +143,7 @@ _cb_http_complete(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
ok = EINA_TRUE;
}
}
}
if (!ok)
{
p = strstr(res, "imgurl=");