changeset 19992:e4dc98b8e140

Fix crash in musicmessaging plugin when something else has set the message to NULL (in this case, I'm guessing the Offline Messaging plugin). Fixes #3050.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 13 Sep 2007 02:38:20 +0000
parents f1bcba415a4b
children e73e510d56ec 4b20ec37460f
files pidgin/plugins/musicmessaging/musicmessaging.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/musicmessaging/musicmessaging.c	Thu Sep 13 02:17:31 2007 +0000
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c	Thu Sep 13 02:38:20 2007 +0000
@@ -311,7 +311,9 @@
 static gboolean
 intercept_sent(PurpleAccount *account, const char *who, char **message, void* pData)
 {
-	
+	if (message == NULL || *message == NULL || **message == '\0')
+		return FALSE;
+
 	if (0 == strncmp(*message, MUSICMESSAGING_PREFIX, strlen(MUSICMESSAGING_PREFIX)))
 	{
 		purple_debug_misc("purple-musicmessaging", "Sent MM Message: %s\n", *message);