mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Ensure GaplessTransport always detaches from before destroying players.
This commit is contained in:
parent
27270e1cf7
commit
ad390fb6f1
@ -116,7 +116,7 @@ void GaplessTransport::StartWithPlayer(Player* newPlayer) {
|
||||
|
||||
playingNext = (newPlayer == nextPlayer);
|
||||
if (nextPlayer != nullptr && newPlayer != nextPlayer) {
|
||||
this->nextPlayer->Destroy();
|
||||
RESET_NEXT_PLAYER(this);
|
||||
}
|
||||
|
||||
RESET_ACTIVE_PLAYER(this);
|
||||
@ -168,8 +168,7 @@ void GaplessTransport::StopInternal(
|
||||
RESET_NEXT_PLAYER(this);
|
||||
|
||||
if (this->activePlayer && this->activePlayer != exclude) {
|
||||
this->activePlayer->Destroy();
|
||||
this->activePlayer = nullptr;
|
||||
RESET_ACTIVE_PLAYER(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user