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];
|
||||
|
||||
[self removeAttributeForName: @"from"];
|
||||
|
||||
if (from_ != nil)
|
||||
[self addAttributeWithName: @"from"
|
||||
stringValue: from_.fullJID];
|
||||
}
|
||||
|
@ -172,6 +174,8 @@
|
|||
[old release];
|
||||
|
||||
[self removeAttributeForName: @"to"];
|
||||
|
||||
if (to_ != nil)
|
||||
[self addAttributeWithName: @"to"
|
||||
stringValue: to_.fullJID];
|
||||
}
|
||||
|
@ -183,6 +187,8 @@
|
|||
[old release];
|
||||
|
||||
[self removeAttributeForName: @"type"];
|
||||
|
||||
if (type_ != nil)
|
||||
[self addAttributeWithName: @"type"
|
||||
stringValue: type];
|
||||
}
|
||||
|
@ -194,6 +200,8 @@
|
|||
[old release];
|
||||
|
||||
[self removeAttributeForName: @"id"];
|
||||
|
||||
if (ID_ != nil)
|
||||
[self addAttributeWithName: @"id"
|
||||
stringValue: ID];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue