1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-27 06:41:15 +00:00

Merge pull request #284 from Zillode/fix-invalid-token

Maintain&check reference to GUI before changing it
This commit is contained in:
Felix Ableitner 2015-03-22 22:50:32 +01:00
commit a3d93a69ca

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();