Fixed to possible NPE in the BasicItemForm.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2939 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
21c4b66746
commit
bf5f36e526
|
|
@ -398,7 +398,7 @@ public abstract class BasicItemForm extends FormSection
|
||||||
if (item == null) { // The content item being null
|
if (item == null) { // The content item being null
|
||||||
// means it is a creation form.
|
// means it is a creation form.
|
||||||
// Therefore finding any item of the same name is a fault.
|
// Therefore finding any item of the same name is a fault.
|
||||||
name.addError(globalize(ERR_MSG));
|
data.addError(globalize(ERR_MSG));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// means we are in a edit form.
|
// means we are in a edit form.
|
||||||
|
|
@ -413,7 +413,7 @@ public abstract class BasicItemForm extends FormSection
|
||||||
String[] itemObj=new String[1];
|
String[] itemObj=new String[1];
|
||||||
itemObj[0]=itemID.toString();
|
itemObj[0]=itemID.toString();
|
||||||
dq.close();
|
dq.close();
|
||||||
name.addError(globalize(ERR_MSG,itemObj));
|
data.addError(globalize(ERR_MSG,itemObj));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue