Mercurial > pidgin
comparison libpurple/log.c @ 18866:e7314d58ebe6
merge of '568907d26b94a41acc8768523cdc469bdf385d2c'
and '90af3f4273c546393e7066ee5f281a8417cb3876'
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Fri, 10 Aug 2007 17:45:05 +0000 |
parents | 5b27ae2413b7 |
children | 941965d6fd88 |
comparison
equal
deleted
inserted
replaced
18829:7a594763c229 | 18866:e7314d58ebe6 |
---|---|
716 | 716 |
717 /* copy any text before the img tag */ | 717 /* copy any text before the img tag */ |
718 if (tmp < start) | 718 if (tmp < start) |
719 g_string_append_len(newmsg, tmp, start - tmp); | 719 g_string_append_len(newmsg, tmp, start - tmp); |
720 | 720 |
721 idstr = g_datalist_get_data(&attributes, "id"); | 721 if ((idstr = g_datalist_get_data(&attributes, "id")) != NULL) |
722 | 722 imgid = atoi(idstr); |
723 imgid = atoi(idstr); | 723 |
724 if (imgid != 0) | 724 if (imgid != 0) |
725 { | 725 { |
726 FILE *image_file; | 726 FILE *image_file; |
727 char *dir; | 727 char *dir; |
728 PurpleStoredImage *image; | 728 PurpleStoredImage *image; |
733 | 733 |
734 image = purple_imgstore_find_by_id(imgid); | 734 image = purple_imgstore_find_by_id(imgid); |
735 if (image == NULL) | 735 if (image == NULL) |
736 { | 736 { |
737 /* This should never happen. */ | 737 /* This should never happen. */ |
738 /* This *does* happen for failed Direct-IMs -DAA */ | |
738 g_string_free(newmsg, TRUE); | 739 g_string_free(newmsg, TRUE); |
739 g_return_val_if_reached((char *)msg); | 740 g_return_val_if_reached((char *)msg); |
740 } | 741 } |
741 | 742 |
742 image_data = purple_imgstore_get_data(image); | 743 image_data = purple_imgstore_get_data(image); |