Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
Fixed a crash with not handled exception
Browse files Browse the repository at this point in the history
Auditors: @bbondy
  • Loading branch information
SergeyZhukovsky authored and bbondy committed Dec 3, 2015
1 parent 76f5e46 commit e01c42c
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,22 @@ private void doFlick(float vx, float vy) {
if (flickDistance > 0.0001f) {
intFraction = intersectionDistance / flickDistance;
}
Util.Assert(intFraction >= 0.0f && intFraction <= 1.05f, "intFraction:" + intFraction + ", flickDistance:" + flickDistance);
float intTime = flickAnimPeriod * intFraction;
try {
Util.Assert(intFraction >= 0.0f && intFraction <= 1.05f, "intFraction:" + intFraction + ", flickDistance:" + flickDistance);
float intTime = flickAnimPeriod * intFraction;

animType = DraggableHelper.AnimationType.Linear;
flickAnimPeriod = intTime;
targetX = (int) intBubbleX;
targetY = (int) intBubbleY;
animType = DraggableHelper.AnimationType.Linear;
flickAnimPeriod = intTime;
targetX = (int) intBubbleX;
targetY = (int) intBubbleY;

tv.setTargetCenter(mTractorBeamIntersectionPoint.x, mTractorBeamIntersectionPoint.y);
tv.setTargetCenter(mTractorBeamIntersectionPoint.x, mTractorBeamIntersectionPoint.y);
}
catch (AssertionError exc) {
if (animType != DraggableHelper.AnimationType.Linear) {
flickAnimPeriod += 0.15f;
}
}

} else {
if (animType != DraggableHelper.AnimationType.Linear) {
Expand Down

0 comments on commit e01c42c

Please sign in to comment.