mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-22 15:40:02 +00:00
Fixed bounds checking in PlaybackService::GetTrack.
This commit is contained in:
parent
5ac6f416db
commit
64a187d1b8
@ -437,7 +437,9 @@ double PlaybackService::GetDuration() {
|
||||
IRetainedTrack* PlaybackService::GetTrack(size_t index) {
|
||||
boost::recursive_mutex::scoped_lock lock(this->playlistMutex);
|
||||
|
||||
if (index >= 0 && index < this->playlist.Count()) {
|
||||
const size_t count = this->playlist.Count();
|
||||
|
||||
if (count && index >= 0 && index < this->playlist.Count()) {
|
||||
return new RetainedTrack(this->playlist.Get(index));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user