Fixed a potential null pointer in the task list refresh receiver:

pull/14/head
Sam Bosley 14 years ago
parent 5c19f75df4
commit fbb2db6482

@ -734,7 +734,9 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
|| !AstridApiConstants.BROADCAST_EVENT_REFRESH.equals(intent.getAction())) || !AstridApiConstants.BROADCAST_EVENT_REFRESH.equals(intent.getAction()))
return; return;
getActivity().runOnUiThread(new Runnable() { Activity activity = getActivity();
if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
refresh(); refresh();
@ -742,6 +744,7 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
}); });
} }
} }
}
/** /**
* Called by the RefreshReceiver when the task list receives a refresh * Called by the RefreshReceiver when the task list receives a refresh

Loading…
Cancel
Save