changeset 32274:1aebe64a412b

Gadu-Gadu: check for NULL pointer before logging system messages.
author tomkiewicz@cpw.pidgin.im
date Sat, 08 Oct 2011 23:07:45 +0000
parents 309b2362c7d8
children 03a55a2997d1
files libpurple/protocols/gg/gg.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Sat Oct 08 22:53:35 2011 +0000
+++ b/libpurple/protocols/gg/gg.c	Sat Oct 08 23:07:45 2011 +0000
@@ -1985,9 +1985,14 @@
 			break;
 		case GG_EVENT_MSG:
 			if (ev->event.msg.sender == 0)
+			{
+				if (ev->event.msg.message == NULL)
+					break;
+
 				/* system messages are mostly ads */
 				purple_debug_info("gg", "System message:\n%s\n",
 					ev->event.msg.message);
+			}
 			else
 				purple_debug_warning("gg", "GG_EVENT_MSG: message from user %u "
 					"unexpected while connecting:\n%s\n",