Skip to content

Commit

Permalink
DrawTask: fix a ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiao committed Sep 8, 2015
1 parent 155cd5d commit f79bd63
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ public synchronized void addDanmaku(BaseDanmaku item) {
} else if (item.isLive) {
mLastBeginMills = mLastEndMills = 0;
}
added = danmakuList.addItem(item);
synchronized (danmakuList) {
added = danmakuList.addItem(item);
}
if (added && mTaskListener != null) {
mTaskListener.onDanmakuAdd(item);
}
Expand Down

0 comments on commit f79bd63

Please sign in to comment.