Ensure GaplessTransport always detaches from before destroying players.

This commit is contained in:
casey langen 2016-12-24 17:31:32 -08:00
parent 27270e1cf7
commit ad390fb6f1

View File

@ -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);
}
}