Revert "Prevent setting the position of a nullptr"
This reverts commit 47ff2cf095
This commit is contained in:
@@ -208,18 +208,15 @@ int RageSoundReader_Chain::SetPosition( int iFrame )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* Find the RageSoundReader. */
|
/* 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;
|
int iOffsetFrames = iFrame - iOffsetFrame;
|
||||||
if (pReader->SetPosition(iOffsetFrames) == 0)
|
if( pReader->SetPosition(iOffsetFrames) == 0 )
|
||||||
{
|
{
|
||||||
/* We're past the end of this sound. */
|
/* We're past the end of this sound. */
|
||||||
ReleaseSound(pSound);
|
ReleaseSound( pSound );
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user