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
|
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
|
||||||
node: (OFString*)node
|
node: (OFString*)node
|
||||||
name: (OFString*)name;
|
name: (OFString*)name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initializes an already allocated XMPPDiscoNode with the specified
|
* \brief Initializes an already allocated XMPPDiscoNode with the specified
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#import "XMPPConnection.h"
|
#import "XMPPConnection.h"
|
||||||
#import "XMPPIQ.h"
|
#import "XMPPIQ.h"
|
||||||
#import "XMPPJID.h"
|
#import "XMPPJID.h"
|
||||||
|
#import "XMPPDiscoEntity.h"
|
||||||
#import "XMPPDiscoNode.h"
|
#import "XMPPDiscoNode.h"
|
||||||
#import "XMPPDiscoIdentity.h"
|
#import "XMPPDiscoIdentity.h"
|
||||||
#import "namespaces.h"
|
#import "namespaces.h"
|
||||||
|
@ -60,7 +61,8 @@
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
if (JID == nil)
|
if ((JID == nil) &&
|
||||||
|
![self isKindOfClass: [XMPPDiscoEntity class]])
|
||||||
@throw [OFInvalidArgumentException exception];
|
@throw [OFInvalidArgumentException exception];
|
||||||
|
|
||||||
_JID = [JID copy];
|
_JID = [JID copy];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue