Fix argument checking for XMPPDiscoEntity
This commit is contained in:
parent
9ae39edeb4
commit
fac12cfde9
2 changed files with 4 additions and 2 deletions
|
@ -75,7 +75,7 @@
|
|||
*/
|
||||
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||
node: (OFString*)node
|
||||
name: (OFString*)name;
|
||||
name: (OFString*)name;
|
||||
|
||||
/**
|
||||
* \brief Initializes an already allocated XMPPDiscoNode with the specified
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#import "XMPPConnection.h"
|
||||
#import "XMPPIQ.h"
|
||||
#import "XMPPJID.h"
|
||||
#import "XMPPDiscoEntity.h"
|
||||
#import "XMPPDiscoNode.h"
|
||||
#import "XMPPDiscoIdentity.h"
|
||||
#import "namespaces.h"
|
||||
|
@ -60,7 +61,8 @@
|
|||
self = [super init];
|
||||
|
||||
@try {
|
||||
if (JID == nil)
|
||||
if ((JID == nil) &&
|
||||
![self isKindOfClass: [XMPPDiscoEntity class]])
|
||||
@throw [OFInvalidArgumentException exception];
|
||||
|
||||
_JID = [JID copy];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue