mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-31 11:55:37 +00:00
CDImage: Fix crash reading subq from lead-in
This commit is contained in:
parent
03c3b10054
commit
cf366d3fba
|
@ -229,7 +229,7 @@ bool CDImage::ReadRawSector(void* buffer)
|
||||||
bool CDImage::ReadSubChannelQ(SubChannelQ* subq)
|
bool CDImage::ReadSubChannelQ(SubChannelQ* subq)
|
||||||
{
|
{
|
||||||
// handle case where we're at the end of the track/index
|
// handle case where we're at the end of the track/index
|
||||||
if (m_position_in_index == m_current_index->length)
|
if (!m_current_index || m_position_in_index == m_current_index->length)
|
||||||
return GenerateSubChannelQ(subq, m_position_on_disc);
|
return GenerateSubChannelQ(subq, m_position_on_disc);
|
||||||
|
|
||||||
// otherwise save the index lookup
|
// otherwise save the index lookup
|
||||||
|
|
Loading…
Reference in a new issue