summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-07 17:59:49 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-07 17:59:49 +0100
commitba862e4eb3be87a4139f66b38aae6effc134f10b (patch)
tree4cf31d996b3257810ee479b18a47617f2f635134 /playlist.c
parentad002369dfe4bca443fbe9fd3ef96967b1c02f97 (diff)
prevent negative total playtime
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index 1a502254..ac93df67 100644
--- a/playlist.c
+++ b/playlist.c
@@ -733,6 +733,9 @@ pl_remove (playItem_t *it) {
// totaltime
if (it->_duration > 0) {
pl_totaltime -= it->_duration;
+ if (pl_totaltime < 0) {
+ pl_totaltime = 0;
+ }
}
pl_item_free (it);
free (it);