about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-08-04 17:04:15 +0100
committerJames Booth <boothj5@gmail.com>2013-08-04 17:04:15 +0100
commite170965c93ae838f3eff00f7558de5186268dd8b (patch)
tree42f4bb4bcb7cbe8d188e56a1334908e472c60dfa /src
parent71f4194513b679ab2f04644700a872ea2c8cb0dd (diff)
downloadprofani-tty-e170965c93ae838f3eff00f7558de5186268dd8b.tar.gz
Added patch from Dmitry to fix crash on delayed message from contact not in roster
fixes #219
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 126fe127..83839952 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -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");