# HG changeset patch # User Yoshiki Yazawa # Date 1215678679 -32400 # Node ID 987607b5ba32d7142de9a7c3c1affa6018d3564e # Parent ab612180e7d0299ad7f5e5315b5a884b801f829e made is_*_conv(conv) return FALSE if conv is NULL. diff -r ab612180e7d0 -r 987607b5ba32 pidgin-twitter.c --- a/pidgin-twitter.c Thu Jul 10 00:12:03 2008 +0900 +++ b/pidgin-twitter.c Thu Jul 10 17:31:19 2008 +0900 @@ -972,6 +972,8 @@ static gboolean is_twitter_conv(PurpleConversation *conv) { + g_return_val_if_fail(conv != NULL, FALSE); + const char *name = purple_conversation_get_name(conv); PurpleAccount *account = purple_conversation_get_account(conv); @@ -996,6 +998,8 @@ static gboolean is_wassr_conv(PurpleConversation *conv) { + g_return_val_if_fail(conv != NULL, FALSE); + const char *name = purple_conversation_get_name(conv); PurpleAccount *account = purple_conversation_get_account(conv); @@ -1020,6 +1024,8 @@ static gboolean is_identica_conv(PurpleConversation *conv) { + g_return_val_if_fail(conv != NULL, FALSE); + const char *name = purple_conversation_get_name(conv); PurpleAccount *account = purple_conversation_get_account(conv); @@ -1100,12 +1106,8 @@ twitter_debug("called\n"); twitter_debug("buffer = %s suppress_oops = %d\n", *buffer, suppress_oops); - /* Check if the conv is not NULL to avoid a clash. - * conv is null when the conversation window has not opened yet. - * And if check is a twitter conv. */ - /* quick hack to suppress annoying completion message from wassr */ - if(conv && is_wassr_conv(conv)) { + if(is_wassr_conv(conv)) { if(strstr(*buffer, "投稿完了:") || strstr(*buffer, "チャンネル投稿完了:")) { twitter_debug("clearing sender and buffer\n"); @@ -1120,7 +1122,7 @@ } } - if(!(conv && is_twitter_conv(conv))) { + if(!is_twitter_conv(conv)) { return FALSE; }