about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_funcs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 9a3d2c93..2c68cd1f 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -1013,8 +1013,12 @@ cmd_account(ProfWin *window, const char *const command, gchar **args)
     }
 
     ProfAccount *account = accounts_get_account(session_get_account_name());
-    cons_show_account(account);
-    account_free(account);
+    if (account) {
+        cons_show_account(account);
+        account_free(account);
+    } else {
+        log_error("Could not get accounts");
+    }
 
     return TRUE;
 }