Skip to content

Commit

Permalink
Fix some glib nullptr-check warning messages
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Jaeckel <[email protected]>
  • Loading branch information
sjaeckel committed Oct 4, 2023
1 parent 6f1ea08 commit 2b29d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config/accounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static void
_accounts_set_string_option(const char* account_name, const char* const option, const char* const value)
{
if (accounts_account_exists(account_name)) {
g_key_file_set_string(accounts, account_name, option, value);
g_key_file_set_string(accounts, account_name, option, value ?: "");
_save_accounts();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/event/server_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ sv_ev_room_history(ProfMessage* message)
ProfMucWin* mucwin = wins_get_muc(message->from_jid->barejid);
if (mucwin) {
// if this is the first successful connection
if (ev_is_first_connect()) {
// or for some reason the `last_msg_timestamp` is not initialized
if (ev_is_first_connect() || !mucwin->last_msg_timestamp) {
// save timestamp of last received muc message
// so we dont display, if there was no activity in channel, once we reconnect
if (mucwin->last_msg_timestamp) {
Expand Down

0 comments on commit 2b29d1b

Please sign in to comment.