File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
ParseLoginUI/src/com/parse/ui Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2424import android .annotation .TargetApi ;
2525import android .os .Build ;
2626import android .support .v4 .app .Fragment ;
27+ import android .support .v4 .app .FragmentActivity ;
2728import android .util .Log ;
2829import android .widget .Toast ;
2930
@@ -76,10 +77,11 @@ protected void debugLog(String text) {
7677
7778 @ TargetApi (Build .VERSION_CODES .JELLY_BEAN_MR1 )
7879 protected boolean isActivityDestroyed () {
80+ FragmentActivity activity = getActivity ();
7981 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .JELLY_BEAN_MR1 ) {
80- return getActivity () .isDestroyed ();
82+ return activity == null || activity .isDestroyed ();
8183 } else {
82- return ((ParseLoginActivity ) getActivity () ).isDestroyed ();
84+ return activity == null || ((ParseLoginActivity ) activity ).isDestroyed ();
8385 }
8486 }
8587}
You can’t perform that action at this time.
0 commit comments