/soc/2013/ankitkv/gobjectification: cd9ebef950c6: Added a check ...

Ankit Vani a at nevitus.org
Fri Jun 28 16:45:57 EDT 2013


Changeset: cd9ebef950c63040b0963b776cd30a905053e84e
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-06-29 02:15 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cd9ebef950c6

Description:

Added a check in finch_chat_update_user(), removed unnecessary reminders from conversation.h

diffstat:

 finch/gntconv.c          |  9 +++++++--
 libpurple/conversation.h |  4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (38 lines):

diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -1151,8 +1151,13 @@ finch_chat_remove_users(PurpleChatConver
 static void
 finch_chat_update_user(PurpleChatConversationBuddy *cb)
 {
-	PurpleChatConversation *chat = purple_chat_conversation_buddy_get_chat(cb);
-	FinchConv *ggc = FINCH_CONV(PURPLE_CONVERSATION(chat));
+	PurpleChatConversation *chat;
+	FinchConv *ggc;
+	if (!cb)
+		return;
+
+	chat = purple_chat_conversation_buddy_get_chat(cb);
+	ggc = FINCH_CONV(PURPLE_CONVERSATION(chat));
 	gnt_tree_change_text(GNT_TREE(ggc->u.chat->userlist),
 			(gpointer)purple_chat_conversation_buddy_get_name(cb), 0,
 			chat_flag_text(purple_chat_conversation_buddy_get_flags(cb)));
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -207,13 +207,13 @@ struct _PurpleConversationUiOps
 	 *  rename message is written to the conversation by libpurple.)
 	 *  @param new_alias  @a new_name's new alias, if they have one.
 	 *  @see purple_chat_conversation_add_users()
-	 */ /* TODO use PurpleChatConversationBuddy */
+	 */
 	void (*chat_rename_user)(PurpleChatConversation *chat, const char *old_name,
 	                         const char *new_name, const char *new_alias);
 	/** Remove @a users from a chat.
 	 *  @param users    A @c GList of <tt>const char *</tt>s.
 	 *  @see purple_chat_conversation_rename_user()
-	 */ /* TODO use PurpleChatConversationBuddy */
+	 */
 	void (*chat_remove_users)(PurpleChatConversation *chat, GList *users);
 	/** Called when a user's flags are changed.
 	 *  @see purple_chat_conversation_buddy_set_flags()



More information about the Commits mailing list