# HG changeset patch # User Yoshiki Yazawa # Date 1209542567 -32400 # Node ID 6ac1867d7e8ecd26b03bc0bb826837d1c49f0279 # Parent 9ac8cea325133f021d91b0efd7f7c8b5eb169593 string list should be initialized with NULL diff -r 9ac8cea32513 -r 6ac1867d7e8e pidgin-twitter.c --- a/pidgin-twitter.c Wed Apr 30 15:47:33 2008 +0900 +++ b/pidgin-twitter.c Wed Apr 30 17:02:47 2008 +0900 @@ -93,6 +93,7 @@ GList *list, *lp; list = purple_prefs_get_string_list(OPT_USERLIST); + g_return_if_fail(list != NULL); g_regex_match (preg, *str, 0, &match_info); while (g_match_info_matches (match_info)) @@ -218,20 +219,16 @@ static void init_plugin(PurplePlugin *plugin) { - GList *list; - g_type_init(); - list = g_list_alloc(); /* add plugin preferences */ purple_prefs_add_none(OPT_PIDGINTWITTER); purple_prefs_add_bool(OPT_TRANSLATE, TRUE); purple_prefs_add_bool(OPT_PLAYSOUND, TRUE); - purple_prefs_add_string_list(OPT_USERLIST, list); + purple_prefs_add_string_list(OPT_USERLIST, NULL); /* compile regex */ - preg = g_regex_new("@[A-Za-z0-9-_]+", 0, 0, NULL); - + preg = g_regex_new("@[A-Za-z0-9_]+", 0, 0, NULL); } PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info)