summaryrefslogtreecommitdiff
path: root/src/users.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.c')
-rw-r--r--src/users.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/users.c b/src/users.c
index f6510ae3d..c019c136b 100644
--- a/src/users.c
+++ b/src/users.c
@@ -183,8 +183,7 @@ void User::SetRealname(const std::string &srealname)
this->realname = sstrdup(srealname.c_str());
NickAlias *na = findnick(this->nick);
- if (na && (nick_identified(this) ||
- (!(this->nc->flags & NI_SECURE) && nick_recognized(this))))
+ if (na && (nick_identified(this) || (!this->nc || (this->nc && !(this->nc->flags & NI_SECURE) && nick_recognized(this)))))
{
if (na->last_realname)
delete [] na->last_realname;
@@ -591,7 +590,7 @@ User *do_nick(const char *source, const char *nick, const char *username, const
}
delete [] logrealname;
}
-
+
/* Allocate User structure and fill it in. */
user = new User(nick, uid ? uid : "");
user->SetIdent(username);