mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-25 07:42:06 +01:00
[xdata] Fix NPE in DataForm.Builder.addItem()
Fixes SMACK-900.
This commit is contained in:
parent
9d734c4a3e
commit
d64a9d9029
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.
|
||||
*/
|
||||
public Builder addItem(Item item) {
|
||||
if (items == null) {
|
||||
items = new ArrayList<>();
|
||||
}
|
||||
items.add(item);
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue