mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
Fixed crash on pressing play button (closes #38)
This commit is contained in:
parent
f974d3b898
commit
43f62d7b8a
@ -104,7 +104,6 @@ void PlaybackQueue::Play(){
|
||||
this->playing = true;
|
||||
this->transport.Start(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
@ -149,6 +148,11 @@ void PlaybackQueue::Stop(){
|
||||
///Return the current running track
|
||||
//////////////////////////////////////////
|
||||
TrackPtr PlaybackQueue::CurrentTrack(){
|
||||
if (this->nowPlaying->Size() <= 0)
|
||||
{
|
||||
return TrackPtr();
|
||||
}
|
||||
|
||||
if(!this->currentTrack){
|
||||
// If the current track is empty, get a track from the nowPlaying tracklist
|
||||
this->SetCurrentTrack( this->nowPlaying->CurrentTrack()->Copy() );
|
||||
|
Loading…
Reference in New Issue
Block a user