diff libpurple/protocols/gg/gg.c @ 31412:fa728fd38c00

When somebody sends me an image, I get some (depends on image size) empty messages. It's about one empty message for every 2kB of image. Steps to reproduce: 1. install and run AQQ on Windows (or any other gadu-gadu client with image sending support), login with one gg account 2. run Pidgin 2.7.11 under linux (maybe on Windows too), login with another gg account 3. send ~50kB image from AQQ to Pidgin 4. you should get 20-30 received empty messages in Pidgin and one with image after it I fixed it by checking if gg message is empty and - if true - drops the message and print warning in debug window. Fixes #13554. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author tomkiewicz@o2.pl
date Thu, 24 Mar 2011 21:04:23 +0000
parents 7c33eaed54e5
children dc63d77fea03
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Thu Mar 24 20:58:10 2011 +0000
+++ b/libpurple/protocols/gg/gg.c	Thu Mar 24 21:04:23 2011 +0000
@@ -1417,6 +1417,12 @@
 	gchar *msg;
 	gchar *tmp;
 
+	if (ev->event.msg.message == NULL)
+	{
+		purple_debug_warning("gg", "ggp_recv_message_handler: NULL as message pointer\n");
+		return;
+	}
+
 	from = g_strdup_printf("%lu", (unsigned long int)ev->event.msg.sender);
 
 	/*