mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 20:29:02 +00:00
fix crash when saving task without checklist
This commit is contained in:
parent
3be14accd7
commit
03a1bdcafa
1 changed files with 6 additions and 1 deletions
|
|
@ -302,7 +302,12 @@ public class TaskFormActivity extends AppCompatActivity implements AdapterView.O
|
|||
private boolean saveTask(Task task) {
|
||||
task.text = taskText.getText().toString();
|
||||
|
||||
task.setChecklist(checklistAdapter.getCheckListItems());
|
||||
if (checklistAdapter != null) {
|
||||
if (checklistAdapter.getCheckListItems() != null) {
|
||||
task.setChecklist(checklistAdapter.getCheckListItems());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (task.text.isEmpty())
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue