1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added patch from Dmitry to fix crash on delayed message from contact not in roster

fixes #219
This commit is contained in:
James Booth 2013-08-04 17:04:15 +01:00
parent 71f4194513
commit e170965c93

View File

@ -399,10 +399,12 @@ ui_incoming_msg(const char * const from, const char * const message,
if (tv_stamp == NULL) {
win_print_time(window, '-');
} else {
// if show users status first, when receiving message via delayed delivery
// show users status first, when receiving message via delayed delivery
if (win_created) {
PContact pcontact = roster_get_contact(from);
win_show_contact(window, pcontact);
if (pcontact != NULL) {
win_show_contact(window, pcontact);
}
}
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");