Fix argument checking for XMPPDiscoEntity
This commit is contained in:
parent
9ae39edeb4
commit
fac12cfde9
2 changed files with 4 additions and 2 deletions
|
@ -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