about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 9f4882fa..736f2fd3 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1578,8 +1578,6 @@ gboolean
 cmd_join(gchar **args, struct cmd_help_t help)
 {
     jabber_conn_status_t conn_status = jabber_get_connection_status();
-    ProfAccount *account = accounts_get_account(jabber_get_account_name());
-
     if (conn_status != JABBER_CONNECTED) {
         cons_show("You are not currently connected.");
         return TRUE;
@@ -1597,6 +1595,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
     char *passwd = NULL;
     GString *room_str = g_string_new("");
     Jid *my_jid = jid_create(jabber_get_fulljid());
+    ProfAccount *account = accounts_get_account(jabber_get_account_name());
 
     // full room jid supplied (room@server)
     if (room_arg->localpart != NULL) {