changeset 31464:566bed5c02f2

gg: Fix a null pointer dereference. This null pointer dereference caused a crash on Windows. Curiously, however, it resulted in an incorrect timestamp in the message log (no crash) on Linux. Fixes #10268. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author tomkiewicz@o2.pl
date Sat, 16 Apr 2011 15:29:26 +0000
parents 8f91d3f76acd
children 26cda93eb18f
files libpurple/protocols/gg/gg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Sat Apr 16 15:23:40 2011 +0000
+++ b/libpurple/protocols/gg/gg.c	Sat Apr 16 15:29:26 2011 +0000
@@ -1383,8 +1383,8 @@
 			info->pending_richtext_messages = g_list_remove(info->pending_richtext_messages, entry->data);
 			/* We don't have any more images to download */
 			if (strstr(text, "<IMG ID=\"IMGID_HANDLER") == NULL) {
-				gchar *buf = g_strdup_printf("%lu", (unsigned long int)ev->event.msg.sender);
-				serv_got_im(gc, buf, text, PURPLE_MESSAGE_IMAGES, ev->event.msg.time);
+				gchar *buf = g_strdup_printf("%lu", (unsigned long int)ev->event.image_reply.sender);
+				serv_got_im(gc, buf, text, PURPLE_MESSAGE_IMAGES, time(NULL));
 				g_free(buf);
 				purple_debug_info("gg", "ggp_recv_image_handler: richtext message: %s\n", text);
 				g_free(text);