mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 14:26:21 +00:00
Merge pull request #2144 from profanity-im/fix/2124
fix: Fix crash when loading MAM for a contact with empty db
This commit is contained in:
@@ -2636,10 +2636,13 @@ iq_mam_request_older(ProfChatWin* win)
|
||||
auto_gchar gchar* enddate = NULL;
|
||||
|
||||
// If first message found
|
||||
if (first_msg->timestamp) {
|
||||
if (first_msg && first_msg->timestamp) {
|
||||
firstid = first_msg->stanzaid;
|
||||
enddate = g_date_time_format(first_msg->timestamp, mam_timestamp_format_string);
|
||||
} else {
|
||||
if (first_msg) {
|
||||
message_free(first_msg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user