mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Make cmd_account safer
This commit is contained in:
parent
d3dd95963e
commit
87b66d0816
@ -1013,8 +1013,12 @@ cmd_account(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProfAccount *account = accounts_get_account(session_get_account_name());
|
ProfAccount *account = accounts_get_account(session_get_account_name());
|
||||||
cons_show_account(account);
|
if (account) {
|
||||||
account_free(account);
|
cons_show_account(account);
|
||||||
|
account_free(account);
|
||||||
|
} else {
|
||||||
|
log_error("Could not get accounts");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user