# HG changeset patch # User Paul Aurich # Date 1251513136 0 # Node ID caa94dfa37f143f8289900b9204c44ea549a6655 # Parent 635b28b527a2bb5f816c5473752e907bcc7ba163 Add assertions to purple_account_add_buddy; a NULL buddy is very bad. Refs #10115. diff -r 635b28b527a2 -r caa94dfa37f1 libpurple/account.c --- a/libpurple/account.c Sat Aug 29 02:29:53 2009 +0000 +++ b/libpurple/account.c Sat Aug 29 02:32:16 2009 +0000 @@ -2290,9 +2290,13 @@ purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy) { PurplePluginProtocolInfo *prpl_info = NULL; - PurpleConnection *gc = purple_account_get_connection(account); + PurpleConnection *gc; PurplePlugin *prpl = NULL; + g_return_if_fail(account != NULL); + g_return_if_fail(buddy != NULL); + + gc = purple_account_get_connection(account); if (gc != NULL) prpl = purple_connection_get_prpl(gc);