1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 08:11:17 +00:00

Do not modify gui if it is destroyed

This commit is contained in:
Lode Hoste 2015-03-22 21:06:26 +01:00
parent db0da97cc4
commit c885445b51

View file

@ -49,7 +49,7 @@ public class MainActivity extends SyncthingActivity
@Override @Override
@SuppressLint("InflateParams") @SuppressLint("InflateParams")
public void onApiChange(SyncthingService.State currentState) { public void onApiChange(SyncthingService.State currentState) {
if (currentState != SyncthingService.State.ACTIVE && !isFinishing()) { if (currentState != SyncthingService.State.ACTIVE && !isFinishing() && !isDestroyed()) {
if (currentState == SyncthingService.State.DISABLED) { if (currentState == SyncthingService.State.DISABLED) {
if (mLoadingDialog != null) { if (mLoadingDialog != null) {
mLoadingDialog.dismiss(); mLoadingDialog.dismiss();