Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #156 from winniehell/GLES2-pTimerSeconds_patch

Additional check in TimerHandler.setTimerSeconds.
  • Loading branch information...
commit e5efa2b5f3c4c7dae9e4efe72384caf0aa817606 2 parents 9ae632b + fccb717
Nicolas Gramlich authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/org/andengine/engine/handler/timer/TimerHandler.java
View
6 src/org/andengine/engine/handler/timer/TimerHandler.java
@@ -34,7 +34,7 @@ public TimerHandler(final float pTimerSeconds, final ITimerCallback pTimerCallba
public TimerHandler(final float pTimerSeconds, final boolean pAutoReset, final ITimerCallback pTimerCallback) {
if(pTimerSeconds <= 0){
- throw new IllegalStateException("pTimerSeconds must be >= 0!");
+ throw new IllegalStateException("pTimerSeconds must be > 0!");
}
this.mTimerSeconds = pTimerSeconds;
@@ -55,6 +55,10 @@ public void setAutoReset(final boolean pAutoReset) {
}
public void setTimerSeconds(final float pTimerSeconds) {
+ if(pTimerSeconds <= 0){
+ throw new IllegalStateException("pTimerSeconds must be > 0!");
+ }
+
this.mTimerSeconds = pTimerSeconds;
}
Please sign in to comment.
Something went wrong with that request. Please try again.