changeset 6136:e391813214a6

[gaim-migrate @ 6610] Patch from SimGuy. Must type fast. CVS may die. Must not waste words. Only precious bytes. So... here it goes.. Almost there. FixesMissingPrplProblemOnAUTOLOGIN!! Phew. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 15 Jul 2003 08:00:55 +0000
parents 8a9eb5e7c0ad
children 6195bfd4e7d0
files src/connection.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/connection.c	Tue Jul 15 03:28:30 2003 +0000
+++ b/src/connection.c	Tue Jul 15 08:00:55 2003 +0000
@@ -107,7 +107,19 @@
 
 	ops = gaim_get_connection_ui_ops();
 
-	prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+	if (gc->prpl != NULL)
+	        prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+	else {
+	        gchar *message = g_strdup_printf(_("Missing protocol plugin for %s"),
+						 gaim_account_get_username(gaim_connection_get_account(gc)));
+
+		gaim_debug(GAIM_DEBUG_ERROR, "connection",
+			   "Could not get prpl info for %p\n", gc);
+		gaim_notify_error(NULL, _("Connection Error"),
+				  message, NULL);
+		g_free(message);
+		return;
+	}
 
 	account = gaim_connection_get_account(gc);