comparison libpurple/log.c @ 19239:829b00936eef

propagate from branch 'im.pidgin.pidgin' (head ee3cab184ee92cf36b4f36013402605653820416) to branch 'im.pidgin.soc.2007.msimprpl' (head 9bcb047516948fbfd4148f735e07e6ea2d96e164)
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 13 Aug 2007 03:58:49 +0000
parents 5b27ae2413b7
children 941965d6fd88
comparison
equal deleted inserted replaced
18915:bfc52862d864 19239:829b00936eef
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);