changeset 18432:f5a17e7e4bfa

Do not crash when people run finch without 'make install'ing first.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 04 Jul 2007 18:56:17 +0000
parents 1dbd8ce2f11f
children 3e4ee49396ad
files finch/gntaccount.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntaccount.c	Tue Jul 03 15:56:24 2007 +0000
+++ b/finch/gntaccount.c	Wed Jul 04 18:56:17 2007 +0000
@@ -472,6 +472,14 @@
 		}
 	}
 
+	list = purple_plugins_get_protocols();
+	if (list == NULL) {
+		purple_notify_error(NULL, _("Error"),
+				_("There's no protocol plugins installed."),
+				_("(You probably forgot to 'make install'.)"));
+		return;
+	}
+
 	dialog = g_new0(AccountEditDialog, 1);
 	accountdialogs = g_list_prepend(accountdialogs, dialog);
 
@@ -489,7 +497,6 @@
 	gnt_box_add_widget(GNT_BOX(window), hbox);
 
 	dialog->protocol = combo = gnt_combo_box_new();
-	list = purple_plugins_get_protocols();
 	for (iter = list; iter; iter = iter->next)
 	{
 		gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data,