# HG changeset patch # User Sadrul Habib Chowdhury # Date 1187902470 0 # Node ID 7e70c8ba6bf4dcb3ebe6880097dec60c1a025ca8 # Parent 8d9913d9fe5a031b42ec9cca73dbf4665f1771e5 Fix #2726. (Segafault on click of unknow button.) It was a bug in the musicmessaging plugin. diff -r 8d9913d9fe5a -r 7e70c8ba6bf4 pidgin/plugins/musicmessaging/musicmessaging.c --- a/pidgin/plugins/musicmessaging/musicmessaging.c Thu Aug 23 18:34:31 2007 +0000 +++ b/pidgin/plugins/musicmessaging/musicmessaging.c Thu Aug 23 20:54:30 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))