Permalink
Browse files

fixed nurupo

  • Loading branch information...
1 parent b6baeb6 commit aa7bd32fbe123482125becd8d3c562b42a49485c @camillol committed Oct 31, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 Player.pde
View
@@ -68,9 +68,11 @@ class PlayBar extends View {
noFill();
rect(MARGIN, MARGIN, w - MARGIN*2, h - MARGIN*2);
- float x = (float)(player.now.getTimeInMillis() - player.firstDate.getTime()) / (player.lastDate.getTime() - player.firstDate.getTime());
- fill(255);
- rect(MARGIN, MARGIN, (w - MARGIN*2) * x, h - MARGIN*2);
+ if (player != null) {
+ float x = (float)(player.now.getTimeInMillis() - player.firstDate.getTime()) / (player.lastDate.getTime() - player.firstDate.getTime());
+ fill(255);
+ rect(MARGIN, MARGIN, (w - MARGIN*2) * x, h - MARGIN*2);
+ }
}
}
}

0 comments on commit aa7bd32

Please sign in to comment.