cpw.malu.client_type: 0cfb29fd: Avoid an assertion when the UI doesn't h...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sat Jun 6 02:50:29 EDT 2009


-----------------------------------------------------------------
Revision: 0cfb29fd4578ae5536a1bbde68a42fd2cfb58d8e
Ancestor: c65d396b0cbf3130f265fb92fc09a4a0cd46acbe
Author: darkrain42 at pidgin.im
Date: 2009-06-06T06:45:53
Branch: im.pidgin.cpw.malu.client_type
URL: http://d.pidgin.im/viewmtn/revision/info/0cfb29fd4578ae5536a1bbde68a42fd2cfb58d8e

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

Avoid an assertion when the UI doesn't have a get_ui_info ui_op

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	601ab1c690e886c76f111be69ce44bb05313c83d
+++ libpurple/protocols/jabber/jabber.c	7ab0c4612b558e02fac08c32046ca19325f12cd1
@@ -3420,10 +3420,13 @@ jabber_init_plugin(PurplePlugin *plugin)
 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 @@ jabber_init_plugin(PurplePlugin *plugin)
 			type = ui_type;
 		}
 	}
-	jabber_plugin = plugin;
 
 	jabber_add_identity("client", type, NULL, PACKAGE);
 


More information about the Commits mailing list