# HG changeset patch # User Eric Warmenhoven # Date 999277764 0 # Node ID 14100685c95f9f3f7fe81dac3ec6c021b3b7f81b # Parent 6b68fbbac3374b59d4e52ef06cf9ac88ad7c8472 [gaim-migrate @ 2213] Robert McQueen pointed this out committer: Tailor Script diff -r 6b68fbbac337 -r 14100685c95f src/multi.c --- a/src/multi.c Fri Aug 31 02:52:03 2001 +0000 +++ b/src/multi.c Fri Aug 31 17:09:24 2001 +0000 @@ -485,6 +485,9 @@ gtk_notebook_remove_page(GTK_NOTEBOOK(book), 1); + if (!p) + return; + if (u && u->opt_entries) { g_list_free(u->opt_entries); u->opt_entries = NULL; @@ -493,7 +496,7 @@ tmpusr.opt_entries = NULL; } - if (p && p->user_opts) { + if (p->user_opts) { GList *op = (*p->user_opts)(); GList *tmp = op; @@ -584,10 +587,21 @@ book = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(box), book, FALSE, FALSE, 0); - if (u) - u->tmp_protocol = u->protocol; - else - tmpusr.tmp_protocol = tmpusr.protocol; + if (u) { + if (find_prpl(u->protocol)) + u->tmp_protocol = u->protocol; + else if (protocols) + u->tmp_protocol = ((struct prpl *)protocols->data)->protocol; + else + u->tmp_protocol = -1; + } else { + if (find_prpl(tmpusr.protocol)) + tmpusr.tmp_protocol = tmpusr.protocol; + else if (protocols) + tmpusr.tmp_protocol = ((struct prpl *)protocols->data)->protocol; + else + tmpusr.tmp_protocol = -1; + } generate_general_options(u, book); generate_prpl_options(u, book); @@ -615,19 +629,19 @@ if (u) { p = find_prpl(u->tmp_protocol); - if (p->options & OPT_PROTO_NO_PASSWORD) { + if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { gtk_widget_hide(u->pwdbox); gtk_widget_hide(u->rempass); } - if (!(p->options & OPT_PROTO_MAIL_CHECK)) + if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) gtk_widget_hide(u->checkmail); } else { p = find_prpl(tmpusr.tmp_protocol); - if (p->options & OPT_PROTO_NO_PASSWORD) { + if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { gtk_widget_hide(tmpusr.pwdbox); gtk_widget_hide(tmpusr.rempass); } - if (!(p->options & OPT_PROTO_MAIL_CHECK)) + if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) gtk_widget_hide(tmpusr.checkmail); } }