Mercurial > pidgin.yaz
changeset 29156:7fb15df96ef4
merge of '05176515f0fedf038217d2e11e4e3a1c92cad166'
and '34ae591131a579911cfae8a20bcf7231fd20aff2'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 08 Dec 2009 07:43:03 +0000 |
parents | 592d382e1bf4 (current diff) 088fac135139 (diff) |
children | be02d04d2fee |
files | |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/libxmpp.c Tue Dec 08 04:52:50 2009 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Tue Dec 08 07:43:03 2009 +0000 @@ -295,7 +295,7 @@ static gboolean xmpp_uri_handler(const char *proto, const char *user, GHashTable *params) { - char *acct_id = g_hash_table_lookup(params, "account"); + char *acct_id = params ? g_hash_table_lookup(params, "account") : NULL; PurpleAccount *acct; if (g_ascii_strcasecmp(proto, "xmpp")) @@ -307,7 +307,8 @@ return FALSE; /* xmpp:romeo@montague.net?message;subject=Test%20Message;body=Here%27s%20a%20test%20message */ - if (g_hash_table_lookup_extended(params, "message", NULL, NULL)) { + /* params is NULL if the URI has no '?' (or anything after it) */ + if (!params || g_hash_table_lookup_extended(params, "message", NULL, NULL)) { char *body = g_hash_table_lookup(params, "body"); if (user && *user) { PurpleConversation *conv =