changeset 1013:966845e5ad29

[gaim-migrate @ 1023] more stupidity. i fixed the wrong thing. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 20 Oct 2000 08:39:34 +0000
parents 7e8dcc609b30
children bc4f6a535bd9
files src/server.c
diffstat 1 files changed, 21 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/server.c	Fri Oct 20 08:01:59 2000 +0000
+++ b/src/server.c	Fri Oct 20 08:39:34 2000 +0000
@@ -142,7 +142,9 @@
 {
 	/* FIXME: getting someone's info? how do you decide something like that? I think that
 	 * the buddy list/UI needs to be really changed before this gets fixed*/
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 
 	if (g && g->prpl && g->prpl->get_info)
 		(*g->prpl->get_info)(g, name);
@@ -151,7 +153,9 @@
 void serv_get_away_msg(char *name)
 {
 	/* FIXME: see the serv_get_info comment above :-P */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 
 	if (g && g->prpl && g->prpl->get_info)
 		(*g->prpl->get_away_msg)(g, name);
@@ -160,7 +164,9 @@
 void serv_get_dir(char *name)
 {
 	/* FIXME: see the serv_get_info comment above :-P */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 
 	if (g && g->prpl && g->prpl->get_dir)
 		(*g->prpl->get_dir)(g, name);
@@ -170,7 +176,9 @@
 		  char *city, char *state, char *country, int web)
 {
 	/* FIXME */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 
 	if (g && g->prpl && g->prpl->set_dir)
 		(*g->prpl->set_dir)(g, first, middle, last, maiden, city, state, country, web);
@@ -180,7 +188,9 @@
 		     char *city, char *state, char *country, char *email)
 {
 	/* FIXME */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 
 	if (g && g->prpl && g->prpl->dir_search)
 		(*g->prpl->dir_search)(g, first, middle, last, maiden, city, state, country, email);
@@ -276,7 +286,9 @@
 void serv_set_permit_deny()
 {
 	/* FIXME */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 	if (g && g->protocol == PROTO_TOC) {
 		char buf[MSG_LEN];
 		int at;
@@ -391,7 +403,9 @@
 void serv_save_config()
 {
 	/* FIXME */
-	struct gaim_connection *g = connections->data;
+	struct gaim_connection *g;
+	if (!connections) return;
+	g = connections->data;
 	if (g && g->protocol == PROTO_TOC) {
 		char *buf = g_malloc(BUF_LONG);
 		char *buf2 = g_malloc(MSG_LEN);