Commit b7356bc5 authored by Max Kellermann's avatar Max Kellermann

decoder/gme: convert runtime check to assertion

When gme_track_info() returns with success, then the gme_info_t pointer must be set.
parent 8ec8282f
...@@ -202,8 +202,10 @@ gme_tag_dup(const char *path_fs) ...@@ -202,8 +202,10 @@ gme_tag_dup(const char *path_fs)
return NULL; return NULL;
} }
assert(ti != NULL);
struct tag *tag = tag_new(); struct tag *tag = tag_new();
if(ti != NULL){
if(ti->length > 0) if(ti->length > 0)
tag->time = ti->length / 1000; tag->time = ti->length / 1000;
if(ti->song != NULL){ if(ti->song != NULL){
...@@ -224,7 +226,6 @@ gme_tag_dup(const char *path_fs) ...@@ -224,7 +226,6 @@ gme_tag_dup(const char *path_fs)
tag_add_item(tag, TAG_COMMENT, ti->comment); tag_add_item(tag, TAG_COMMENT, ti->comment);
if(ti->copyright != NULL) if(ti->copyright != NULL)
tag_add_item(tag, TAG_DATE, ti->copyright); tag_add_item(tag, TAG_DATE, ti->copyright);
}
gme_free_info(ti); gme_free_info(ti);
gme_delete(emu); gme_delete(emu);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment