vgmstream-cli: prevent segfault when printing metadata

This commit is contained in:
John Regan 2018-11-29 23:22:30 +00:00
parent eb3f49cb03
commit b781d01aa1

View File

@ -433,8 +433,11 @@ int main(int argc, char ** argv) {
/* prints done */
if (cfg.print_metaonly) {
if (!cfg.play_sdtout)
fclose(outfile);
if (!cfg.play_sdtout) {
if(outfile != NULL) {
fclose(outfile);
}
}
close_vgmstream(vgmstream);
return EXIT_SUCCESS;
}