mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 700559 - Fix crash in startSnap() [r=pcwalton]
There exist conditions where the position of the page can change between the call to fling() and the running of the FlingRunnable, since the FlingRunnable gets bounced off two threads. This can cause the Axis to end up in state WAITING_TO_SNAP with no overscroll. Instead of crashing, handle this case more gracefully.
This commit is contained in:
parent
a95c9c748e
commit
edfd1f5c4a
@ -516,7 +516,9 @@ public class PanZoomController
|
||||
mSnapAnim = new EaseOutAnimation(viewportPos, viewportPos - getExcess());
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Not overscrolled at startSnap()");
|
||||
// no overscroll to deal with, so we're done
|
||||
mFlingState = FlingStates.STOPPED;
|
||||
return;
|
||||
}
|
||||
|
||||
mFlingState = FlingStates.SNAPPING;
|
||||
|
Loading…
Reference in New Issue
Block a user