changeset 25148:6adbaf3d25e3

Fix a null dereference on non-connected accounts
author Paul Aurich <paul@darkrain42.org>
date Sun, 23 Nov 2008 03:52:33 +0000
parents 6d6e10476c52
children a259d2711416
files libpurple/protocols/jabber/caps.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/caps.c	Fri Nov 21 04:18:19 2008 +0000
+++ b/libpurple/protocols/jabber/caps.c	Sun Nov 23 03:52:33 2008 +0000
@@ -874,7 +874,7 @@
 	for (node = accounts; node; node = node->next) {
 		PurpleAccount *account = node->data;
 		const char *prpl_id = purple_account_get_protocol_id(account);
-		if (!strcmp("prpl-jabber", prpl_id)) {
+		if (!strcmp("prpl-jabber", prpl_id) && purple_account_is_connected(account)) {
 			PurpleConnection *gc = purple_account_get_connection(account);
 			jabber_presence_send(gc->proto_data, TRUE);
 		}