Skip to content

Commit

Permalink
DanmakuView: avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiao committed Feb 6, 2015
1 parent aebf7ce commit 7402aaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ public long drawDanmakus() {
mDrawTimes = new LinkedList<Long>();
dtime = System.currentTimeMillis() - stime;
String fps = String.format(Locale.getDefault(),
"fps %.2f,time:%d s,cache:%d,miss:%d", fps(),
handler.getCurrentTime() / 1000, rs.cacheHitCount, rs.cacheMissCount);
"fps %.2f,time:%d s,cache:%d,miss:%d", fps(), getCurrentTime() / 1000,
rs.cacheHitCount, rs.cacheMissCount);
DrawHelper.drawFPS(canvas, fps);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ public synchronized long drawDanmakus() {
mDrawTimes = new LinkedList<Long>();
dtime = System.currentTimeMillis() - stime;
String fps = String.format(Locale.getDefault(),
"fps %.2f,time:%d s,cache:%d,miss:%d", fps(),
handler.getCurrentTime() / 1000, rs.cacheHitCount, rs.cacheMissCount);
"fps %.2f,time:%d s,cache:%d,miss:%d", fps(), getCurrentTime() / 1000,
rs.cacheHitCount, rs.cacheMissCount);
DrawHelper.drawFPS(canvas, fps);
}
}
Expand Down

0 comments on commit 7402aaa

Please sign in to comment.