Fixed the crittercism-NullPointerException for quickadding a task in a list

without a name.
I couldnt reproduce this myself, couldnt produce a list without a name
(null-value in TagData.NAME) but this should fix it nevertheless.
pull/14/head
Arne Jans 13 years ago
parent 9165b19fdd
commit fa6f267696

@ -478,7 +478,8 @@ public class TagViewActivity extends TaskListActivity {
@Override
protected Task quickAddTask(String title, boolean selectNewTask) {
if(tagData.getValue(TagData.NAME).length() == 0) {
if(!tagData.containsNonNullValue(TagData.NAME) ||
tagData.getValue(TagData.NAME).length() == 0) {
DialogUtilities.okDialog(this, getString(R.string.tag_no_title_error), null);
return null;
}

Loading…
Cancel
Save