mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Merge pull request #455 from Flowdalic/fix-data-form-npe
[xdata] Fix NPE in DataForm.Builder.addItem()
This commit is contained in:
commit
ec2ef1facc
1 changed files with 3 additions and 0 deletions
|
@ -494,6 +494,9 @@ public final class DataForm implements ExtensionElement {
|
||||||
* @return a reference to this builder.
|
* @return a reference to this builder.
|
||||||
*/
|
*/
|
||||||
public Builder addItem(Item item) {
|
public Builder addItem(Item item) {
|
||||||
|
if (items == null) {
|
||||||
|
items = new ArrayList<>();
|
||||||
|
}
|
||||||
items.add(item);
|
items.add(item);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue