Skip to content

Commit

Permalink
Merge pull request profanity-im#1916 from H3rnand3zzz/fix/null-message
Browse files Browse the repository at this point in the history
Improve handling of NULL pointers fetched from DB
  • Loading branch information
jubalh authored Nov 7, 2023
2 parents 6d17b4e + bc38ddf commit 9741f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ log_database_get_previous_chat(const gchar* const contact_barejid, const char* s
ProfMessage* msg = message_init();
msg->from_jid = jid_create(from);
msg->to_jid = jid_create(to_jid);
msg->plain = _db_strdup(message);
msg->plain = strdup(message ?: "");
msg->timestamp = g_date_time_new_from_iso8601(date, NULL);
msg->type = _get_message_type_type(type);
msg->enc = _get_message_enc_type(encryption);
Expand Down

0 comments on commit 9741f19

Please sign in to comment.