From dfa75893456395373d2d8291a9a330d9a04bd2ae Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:07:16 -0700 Subject: [PATCH] Revert "Prevent setting the position of a nullptr" This reverts commit 47ff2cf0952ecf7b965a685dacd140f8329aa2e9 --- src/RageSoundReader_Chain.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/RageSoundReader_Chain.cpp b/src/RageSoundReader_Chain.cpp index 64d9582514..2c8d968b73 100644 --- a/src/RageSoundReader_Chain.cpp +++ b/src/RageSoundReader_Chain.cpp @@ -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; } }