From 1703194b0283b29a9363439f8b35f36901dfd31e Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 21 Mar 2015 21:48:24 +0100 Subject: [PATCH] Check if timer is null. --- .../nutomic/syncthingandroid/fragments/DrawerFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java b/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java index 9115d2e4..ea12b10b 100644 --- a/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java +++ b/src/main/java/com/nutomic/syncthingandroid/fragments/DrawerFragment.java @@ -97,8 +97,10 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI } public void onDrawerClosed() { - mTimer.cancel(); - mTimer = null; + if (mTimer != null) { + mTimer.cancel(); + mTimer = null; + } } @Override