From 8da0f3b4c69a0d782fecd57707d7659178716cdd Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 24 Apr 2015 17:23:41 -0700 Subject: Fix crash if user backs out during remote operation --- src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 330f91bb..ca0ac2f6 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -570,7 +570,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity { }.execute(); } private void loadRemotePlayQueue() { - final Context context = this; + final SubsonicActivity context = this; new SilentBackgroundTask(this) { private PlayerQueue playerQueue; @@ -605,7 +605,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity { @Override protected void done(Void arg) { - if(playerQueue != null) { + if(!context.isDestroyedCompat() && playerQueue != null) { promptRestoreFromRemoteQueue(playerQueue); } } -- cgit v1.2.3