changeset 19386:31d1143ac9ed

merge of '64a21ba142d57ec69f4b25cf89b5e725ff2a4752' and 'b5e04374f6f6b3a7543c52514185b6d46e12bd7c'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 23 Aug 2007 20:55:59 +0000
parents 3bc55836f621 (current diff) 7e70c8ba6bf4 (diff)
children 7e326d88bb42
files
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/musicmessaging/musicmessaging.c	Thu Aug 23 20:03:00 2007 +0000
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c	Thu Aug 23 20:55:59 2007 +0000
@@ -71,10 +71,10 @@
 
 /* Globals */
 /* List of sessions */
-GList *conversations;
+static GList *conversations;
 
 /* Pointer to this plugin */
-PurplePlugin *plugin_pointer;
+static PurplePlugin *plugin_pointer;
 
 /* Define types needed for DBus */
 DBusGConnection *connection;
@@ -350,7 +350,16 @@
 static gboolean
 intercept_received(PurpleAccount *account, char **sender, char **message, PurpleConversation *conv, int *flags)
 {
-	MMConversation *mmconv = mmconv_from_conv(conv);
+	MMConversation *mmconv;
+	
+	if (conv == NULL) {
+		/* XXX: This is just to avoid a crash (#2726).
+		 *      We may want to create the conversation instead of returning from here
+		 */
+		return FALSE;
+	}
+
+	mmconv = mmconv_from_conv(conv);
 	
 	purple_debug_misc("purple-musicmessaging", "Intercepted: %s\n", *message);
 	if (strstr(*message, MUSICMESSAGING_PREFIX))