aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/traccar/manager/StartFragment.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-01 23:21:05 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-01 23:21:05 +1300
commit4cc8595e84fce7012a1836d06a5e3d5b18c07769 (patch)
treea6fa20caee83365e720f742413bc869003673c72 /app/src/main/java/org/traccar/manager/StartFragment.java
parent1637915c21ce99fc1ea21d4549d28dbd86adfca8 (diff)
downloadetbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.tar.gz
etbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.tar.bz2
etbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.zip
Check activity in callback
Diffstat (limited to 'app/src/main/java/org/traccar/manager/StartFragment.java')
-rw-r--r--app/src/main/java/org/traccar/manager/StartFragment.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/org/traccar/manager/StartFragment.java b/app/src/main/java/org/traccar/manager/StartFragment.java
index f56d7e8..c88c260 100644
--- a/app/src/main/java/org/traccar/manager/StartFragment.java
+++ b/app/src/main/java/org/traccar/manager/StartFragment.java
@@ -87,10 +87,12 @@ public class StartFragment extends Fragment implements View.OnClickListener {
@Override
protected void onPostExecute(Boolean result) {
- if (result) {
- onSuccess();
- } else {
- onError();
+ if (getActivity() != null) {
+ if (result) {
+ onSuccess();
+ } else {
+ onError();
+ }
}
}