1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

* Fixed safety-check in PlaylistInterface. 0 is a valid index.

This commit is contained in:
Christian Muehlhaeuser
2012-12-03 22:23:31 +01:00
parent e968e84fa3
commit 5ec024c550

View File

@@ -58,7 +58,7 @@ Tomahawk::result_ptr
PlaylistInterface::siblingResult( int itemsAway ) const PlaylistInterface::siblingResult( int itemsAway ) const
{ {
qint64 idx = siblingIndex( itemsAway ); qint64 idx = siblingIndex( itemsAway );
qint64 safetyCheck = 0; qint64 safetyCheck = -1;
// If safetyCheck equals idx, this means the interface keeps returning the same item and we won't discover anything new - abort // If safetyCheck equals idx, this means the interface keeps returning the same item and we won't discover anything new - abort
// This can happen in repeat / random mode e.g. // This can happen in repeat / random mode e.g.