1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +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
@SuppressLint("InflateParams")
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 (mLoadingDialog != null) {
mLoadingDialog.dismiss();