Skip to content

Commit 5fc9f84

Browse files
author
maskara
committed
Fixes #614: Crash: Fragment State loss exception
1 parent f6a7759 commit 5fc9f84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java

+6
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ protected void onResume() {
149149
checkGps();
150150
}
151151

152+
@Override
153+
protected void onPause() {
154+
super.onPause();
155+
nearbyAsyncTask.cancel(true);
156+
}
157+
152158
protected void refreshView() {
153159
nearbyAsyncTask = new NearbyAsyncTask(this);
154160
nearbyAsyncTask.execute();

0 commit comments

Comments
 (0)