# HG changeset patch # User Daniel Atallah # Date 1186758244 0 # Node ID 5b27ae2413b7194ae231782eee9ee462ea60472d # Parent 54e020a8b6b979ae35da0b84bc39cd1a7a68c262 bug fix diff -r 54e020a8b6b9 -r 5b27ae2413b7 libpurple/log.c --- a/libpurple/log.c Fri Aug 10 13:28:12 2007 +0000 +++ b/libpurple/log.c Fri Aug 10 15:04:04 2007 +0000 @@ -718,9 +718,9 @@ if (tmp < start) g_string_append_len(newmsg, tmp, start - tmp); - idstr = g_datalist_get_data(&attributes, "id"); + if ((idstr = g_datalist_get_data(&attributes, "id")) != NULL) + imgid = atoi(idstr); - imgid = atoi(idstr); if (imgid != 0) { FILE *image_file; @@ -735,6 +735,7 @@ if (image == NULL) { /* This should never happen. */ + /* This *does* happen for failed Direct-IMs -DAA */ g_string_free(newmsg, TRUE); g_return_val_if_reached((char *)msg); }