don't change cursor if adapter is null

Fixes #2970
Closes #2977

// FREEBIE
This commit is contained in:
Jake McGinty 2015-04-13 11:49:08 -07:00 committed by Moxie Marlinspike
parent a28408b29f
commit 6d2b87d385

View File

@ -283,12 +283,16 @@ public class ConversationFragment extends ListFragment
@Override
public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
((CursorAdapter)getListAdapter()).changeCursor(cursor);
if (getListAdapter() != null) {
((CursorAdapter) getListAdapter()).changeCursor(cursor);
}
}
@Override
public void onLoaderReset(Loader<Cursor> arg0) {
((CursorAdapter)getListAdapter()).changeCursor(null);
if (getListAdapter() != null) {
((CursorAdapter) getListAdapter()).changeCursor(null);
}
}
public interface ConversationFragmentListener {