# HG changeset patch # User Paul Aurich # Date 1244270753 0 # Node ID 2d258a809609a84099f1b5124cab0aaaea89f465 # Parent dd7e7071d46d0fdb864413577a41c09be9b6c69c Avoid an assertion when the UI doesn't have a get_ui_info ui_op diff -r dd7e7071d46d -r 2d258a809609 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sat Jun 06 06:33:18 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat Jun 06 06:45:53 2009 +0000 @@ -3420,10 +3420,13 @@ jabber_init_plugin(PurplePlugin *plugin) { GHashTable *ui_info = purple_core_get_ui_info(); - const gchar *ui_type = g_hash_table_lookup(ui_info, "client_type"); + const gchar *ui_type; const gchar *type = "pc"; /* default client type, if unknown or unspecified */ + jabber_plugin = plugin; + + ui_type = ui_info ? g_hash_table_lookup(ui_info, "client_type") : NULL; if (ui_type) { if (strcmp(ui_type, "pc") == 0 || strcmp(ui_type, "console") == 0 || @@ -3434,7 +3437,6 @@ type = ui_type; } } - jabber_plugin = plugin; jabber_add_identity("client", type, NULL, PACKAGE);