Handle nil as argument to XMPPStanza's setters
This commit is contained in:
parent
a972fe397e
commit
1f98e7b726
1 changed files with 16 additions and 8 deletions
|
@ -161,6 +161,8 @@
|
||||||
[old release];
|
[old release];
|
||||||
|
|
||||||
[self removeAttributeForName: @"from"];
|
[self removeAttributeForName: @"from"];
|
||||||
|
|
||||||
|
if (from_ != nil)
|
||||||
[self addAttributeWithName: @"from"
|
[self addAttributeWithName: @"from"
|
||||||
stringValue: from_.fullJID];
|
stringValue: from_.fullJID];
|
||||||
}
|
}
|
||||||
|
@ -172,6 +174,8 @@
|
||||||
[old release];
|
[old release];
|
||||||
|
|
||||||
[self removeAttributeForName: @"to"];
|
[self removeAttributeForName: @"to"];
|
||||||
|
|
||||||
|
if (to_ != nil)
|
||||||
[self addAttributeWithName: @"to"
|
[self addAttributeWithName: @"to"
|
||||||
stringValue: to_.fullJID];
|
stringValue: to_.fullJID];
|
||||||
}
|
}
|
||||||
|
@ -183,6 +187,8 @@
|
||||||
[old release];
|
[old release];
|
||||||
|
|
||||||
[self removeAttributeForName: @"type"];
|
[self removeAttributeForName: @"type"];
|
||||||
|
|
||||||
|
if (type_ != nil)
|
||||||
[self addAttributeWithName: @"type"
|
[self addAttributeWithName: @"type"
|
||||||
stringValue: type];
|
stringValue: type];
|
||||||
}
|
}
|
||||||
|
@ -194,6 +200,8 @@
|
||||||
[old release];
|
[old release];
|
||||||
|
|
||||||
[self removeAttributeForName: @"id"];
|
[self removeAttributeForName: @"id"];
|
||||||
|
|
||||||
|
if (ID_ != nil)
|
||||||
[self addAttributeWithName: @"id"
|
[self addAttributeWithName: @"id"
|
||||||
stringValue: ID];
|
stringValue: ID];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue