Handle nil as argument to XMPPStanza's setters

This commit is contained in:
Florian Zeitz 2011-03-24 18:57:07 +01:00
parent a972fe397e
commit 1f98e7b726

View file

@ -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];
}