From a529d788804e77d707e13be8d5a44b543e3b3b32 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 29 Mar 2015 20:16:56 +0200 Subject: [PATCH] Don't crash on no metadata... --- src/transcode.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/transcode.c b/src/transcode.c index ee112f5d..f3c1f170 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -907,6 +907,8 @@ transcode_metadata(struct transcode_ctx *ctx, struct http_icy_metadata **metadat return; m = http_icy_metadata_get(ctx->fmtctx, 1); + if (!m) + return; *changed = (m->hash != ctx->icy_hash); @@ -929,7 +931,11 @@ transcode_metadata_artwork_url(struct transcode_ctx *ctx, char **artwork_url, ch return; m = http_icy_metadata_get(ctx->fmtctx, 1); + if (!m) + return; if (m->artwork_url) *artwork_url = strdup(m->artwork_url); + + http_icy_metadata_free(m); }