Skip to content

Commit

Permalink
fix(android): prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed May 17, 2021
1 parent d428748 commit 65ce28a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,15 @@ public final void handle(MotionEvent origEvent) {
}

private void moveToState(int newState) {
if (mOrchestrator == null) {
// ignore not prepared
return;
}
if (mState == newState) {
return;
}
int oldState = mState;
mState = newState;

mOrchestrator.onHandlerStateChange(this, newState, oldState);

onStateChange(newState, oldState);
Expand Down

0 comments on commit 65ce28a

Please sign in to comment.