about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2013-01-13 00:43:02 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2013-01-13 00:44:40 +0200
commit175963eb51bff2262446ea225e3b7879cc0e7cb5 (patch)
tree80f0bf95f7727333b9f799392cdb26f8d8fab418 /src
parentef49afdc63256d31319faba33e75fb378daf9da8 (diff)
downloadprofani-tty-175963eb51bff2262446ea225e3b7879cc0e7cb5.tar.gz
check account->name == NULL
Diffstat (limited to 'src')
-rw-r--r--src/jabber.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jabber.c b/src/jabber.c
index 85c06f0d..7645012f 100644
--- a/src/jabber.c
+++ b/src/jabber.c
@@ -118,6 +118,10 @@ jabber_conn_status_t
 jabber_connect_with_account(ProfAccount *account, const char * const passwd)
 {
     FREE_SET_NULL(saved_user.account);
+
+    if (account->name == NULL)
+        return JABBER_UNDEFINED;
+
     saved_user.account = strdup(account->name);
     log_info("Connecting with account: %s", account->name);
     return jabber_connect(account->jid, passwd, account->server);