Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for skipping Runnables in RunnableHandler

Runnables added to mRunnables while walking through mRunnables list
where never run.
  • Loading branch information...
commit 4ee68dc881566d36c1fdada6c979d4642e26cd98 1 parent e6df5e8
@nazgee nazgee authored
View
3  src/org/andengine/engine/handler/runnable/RunnableHandler.java
@@ -39,9 +39,8 @@ public synchronized void onUpdate(final float pSecondsElapsed) {
final ArrayList<Runnable> runnables = this.mRunnables;
final int runnableCount = runnables.size();
for(int i = runnableCount - 1; i >= 0; i--) {
- runnables.get(i).run();
+ runnables.remove(i).run();
}
- runnables.clear();
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.