mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 09:26:21 +00:00
fix: database return NULL if no history limits are found
log_database_get_limits_info should return NULL when a contact has no history in the database. We hit a bug with `/msg adsf@asd` before.
This commit is contained in:
@@ -309,6 +309,9 @@ log_database_get_limits_info(const gchar* const contact_barejid, gboolean is_las
|
|||||||
|
|
||||||
msg->stanzaid = _db_strdup(archive_id);
|
msg->stanzaid = _db_strdup(archive_id);
|
||||||
msg->timestamp = g_date_time_new_from_iso8601(date, NULL);
|
msg->timestamp = g_date_time_new_from_iso8601(date, NULL);
|
||||||
|
} else {
|
||||||
|
message_free(msg);
|
||||||
|
msg = NULL;
|
||||||
}
|
}
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user