Permalink
Browse files

Return nil when creating a TNStropheJID with a nil string

  • Loading branch information...
1 parent 5caec9f commit e5f57cbb641a54861df44603776214cdf892ef0d @benlangfeld committed Jan 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 TNStropheJID.j
View
@@ -105,6 +105,9 @@ TNStropheJIDExceptionJID = @"TNStropheJIDExceptionJID";
*/
- (TNStropheJID)initWithString:(CPString)aStringJID
{
+ if (!aStringJID)
+ return;
+
var node = aStringJID.split("@")[0],
domain,
resource;

0 comments on commit e5f57cb

Please sign in to comment.