diff options
Diffstat (limited to 'java/com/android/dialer/app/calllog/CallLogFragment.java')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogFragment.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogFragment.java b/java/com/android/dialer/app/calllog/CallLogFragment.java index 5cb0244c5..5e8da032b 100644 --- a/java/com/android/dialer/app/calllog/CallLogFragment.java +++ b/java/com/android/dialer/app/calllog/CallLogFragment.java @@ -450,7 +450,9 @@ public class CallLogFragment extends Fragment @Override public void onDestroy() { LogUtil.enterBlock("CallLogFragment.onDestroy"); - mAdapter.changeCursor(null); + if (mAdapter != null) { + mAdapter.changeCursor(null); + } getActivity().getContentResolver().unregisterContentObserver(mCallLogObserver); getActivity().getContentResolver().unregisterContentObserver(mContactsObserver); @@ -467,7 +469,9 @@ public class CallLogFragment extends Fragment outState.putBoolean(KEY_HAS_READ_CALL_LOG_PERMISSION, mHasReadCallLogPermission); outState.putBoolean(KEY_REFRESH_DATA_REQUIRED, mRefreshDataRequired); outState.putBoolean(KEY_SELECT_ALL_MODE, selectAllMode); - mAdapter.onSaveInstanceState(outState); + if (mAdapter != null) { + mAdapter.onSaveInstanceState(outState); + } } @Override |