summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/calculator2/HistoryFragment.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/calculator2/HistoryFragment.java b/src/com/android/calculator2/HistoryFragment.java
index 64a94f9..e2c0974 100644
--- a/src/com/android/calculator2/HistoryFragment.java
+++ b/src/com/android/calculator2/HistoryFragment.java
@@ -176,9 +176,11 @@ public class HistoryFragment extends Fragment implements DragLayout.DragCallback
mDragLayout.removeDragCallback(this);
}
- // Note that the view is destroyed when the fragment backstack is popped, so
- // these are essentially called when the DragLayout is closed.
- mEvaluator.cancelNonMain();
+ if (mEvaluator != null) {
+ // Note that the view is destroyed when the fragment backstack is popped, so
+ // these are essentially called when the DragLayout is closed.
+ mEvaluator.cancelNonMain();
+ }
}
private void initializeController(boolean isResult, boolean isOneLine) {