Revert "Prevent setting the position of a nullptr"

This reverts commit 47ff2cf095
This commit is contained in:
sukibaby
2024-08-06 15:32:11 -07:00
committed by teejusb
parent 2fd1bff510
commit dfa7589345
+8 -11
View File
@@ -208,18 +208,15 @@ int RageSoundReader_Chain::SetPosition( int iFrame )
break;
/* Find the RageSoundReader. */
if (pSound->pSound == nullptr) // Only activate if not already active
{
ActivateSound(pSound);
RageSoundReader* pReader = pSound->pSound;
ActivateSound( pSound );
RageSoundReader *pReader = pSound->pSound;
int iOffsetFrames = iFrame - iOffsetFrame;
if (pReader->SetPosition(iOffsetFrames) == 0)
{
/* We're past the end of this sound. */
ReleaseSound(pSound);
continue;
}
int iOffsetFrames = iFrame - iOffsetFrame;
if( pReader->SetPosition(iOffsetFrames) == 0 )
{
/* We're past the end of this sound. */
ReleaseSound( pSound );
continue;
}
}