Resolve Crash on CourseOutlineFragment onItemLongClick
@@ -307,7 +307,8 @@ public class CourseOutlineFragment extends OfflineSupportBaseFragment
listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
- if (((IconImageView) view.findViewById(R.id.bulk_download)).getIcon() == FontAwesomeIcons.fa_check) {
+ IconImageView bulkDownload = (IconImageView) view.findViewById(R.id.bulk_download);
+ if (bulkDownload != null && bulkDownload.getIcon() == FontAwesomeIcons.fa_check) {
((AppCompatActivity) getActivity()).startSupportActionMode(deleteModelCallback);
listView.setItemChecked(position, true);
return true;
