mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Fix a crash bug when retrieving info...
...from invalid subsongs, which would otherwise cause a null pointer dereference
This commit is contained in:
parent
3955ab4bb4
commit
401eb1263d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user