Skip to content

Commit

Permalink
Fix null pointer exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellsundt committed Oct 13, 2015
1 parent 4d007d5 commit bc242a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2315,7 +2315,7 @@ private void afterAllAnimations() {
mStaleView = null;
}

if (mCurrentView instanceof ODKView) {
if (mCurrentView != null && mCurrentView instanceof ODKView) {
((ODKView) mCurrentView).setFocus(this);
}
mBeenSwiped = false;
Expand Down Expand Up @@ -2682,7 +2682,7 @@ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
int xPixelLimit = (int) (dm.xdpi * .25);
int yPixelLimit = (int) (dm.ydpi * .25);

if (mCurrentView instanceof ODKView) {
if (mCurrentView != null && mCurrentView instanceof ODKView) {
if (((ODKView) mCurrentView).suppressFlingGesture(e1, e2,
velocityX, velocityY)) {
return false;
Expand Down

0 comments on commit bc242a1

Please sign in to comment.