diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-10-10 18:06:28 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-10-10 18:06:28 +0200 |
commit | 87b66d0816e1ad2d145ea87279461c02aaf49094 (patch) | |
tree | 4533cc7f10eabcaa3cb6a862892cf9c6fd49764c /src | |
parent | d3dd95963e354c3e75f4a6e627acb3644c679fbf (diff) | |
download | profani-tty-87b66d0816e1ad2d145ea87279461c02aaf49094.tar.gz |
Make cmd_account safer
Diffstat (limited to 'src')
-rw-r--r-- | src/command/cmd_funcs.c | 8 |
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; } |