pidgin: 941f01ed: jabber: Complete the fix for a NULL prin...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Tue Dec 1 16:20:43 EST 2009


-----------------------------------------------------------------
Revision: 941f01ed2234f8e476b7260fbd6ea873583387f7
Ancestor: a3e3cb37bb04fec56b54fa77acd443e05e17d0a6
Author: darkrain42 at pidgin.im
Date: 2009-12-01T21:18:45
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/941f01ed2234f8e476b7260fbd6ea873583387f7

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

ChangeLog: 

jabber: Complete the fix for a NULL printf() on registration on Windows.  Closes #10420 again.

Man, do I hate these NULL printf() bugs.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	739a0e2460a56e90818d6e6156ea37fa9d5fdde5
+++ libpurple/protocols/jabber/jabber.c	f6844127d069119d3032bf961c16be325e4cddc7
@@ -1116,7 +1116,8 @@ jabber_register_cb(JabberRegisterCBData 
 
 	if(cbdata->js->registration) {
 		username = g_strdup_printf("%s@%s%s%s", cbdata->js->user->node, cbdata->js->user->domain,
-			cbdata->js->user->resource ? "/" : "", cbdata->js->user->resource);
+			cbdata->js->user->resource ? "/" : "",
+			cbdata->js->user->resource ? cbdata->js->user->resource : "");
 		purple_account_set_username(cbdata->js->gc->account, username);
 		g_free(username);
 	}


More information about the Commits mailing list