Fix a crash bug when retrieving info...

...from invalid subsongs, which would otherwise cause a null pointer dereference
This commit is contained in:
Christopher Snowhill 2018-12-17 02:00:01 -08:00 committed by GitHub
parent 3955ab4bb4
commit 401eb1263d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -445,6 +445,9 @@ void input_vgmstream::get_subsong_info(t_uint32 p_subsong, pfc::string_base & ti
// there is no need to recreate the infostream, there is only one subsong used
if (subsong != p_subsong && !direct_subsong) {
infostream = init_vgmstream_foo(p_subsong, filename, p_abort);
if (!infostream) {
throw exception_io_data();
}
set_config_defaults(&infoconfig);
apply_config(infostream,&infoconfig);
is_infostream = true;